From b53d7867bb7131a667676fc1f6bc41336e9e9889 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 16 Sep 2016 15:23:18 +0000 Subject: [PATCH] EgtExecutor : - inibita registrazione comando mentre si esegue un altro comando. --- EXE_GdbObjAttribs.cpp | 2 ++ EXE_GdbObjects.cpp | 16 +++++++++++----- EXE_GeomDB.cpp | 4 ++++ EgtExecutor.rc | Bin 11694 -> 11694 bytes 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/EXE_GdbObjAttribs.cpp b/EXE_GdbObjAttribs.cpp index bc2ad39..26de603 100644 --- a/EXE_GdbObjAttribs.cpp +++ b/EXE_GdbObjAttribs.cpp @@ -156,10 +156,12 @@ ExeSetStatus( const INTVECTOR& vIds, int nStat) } } // se pezzo o layer correnti da rideterminare + bool bPrevCmdLog = SetCmdLog( false) ; if ( bCurrPartOff) ExeResetCurrPartLayer() ; else if ( bCurrLayerOff) ExeSetCurrPartLayer( nCurrPartId, ExeGetFirstLayer( nCurrPartId, true)) ; + SetCmdLog( bPrevCmdLog) ; // dichiaro progetto modificato ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente diff --git a/EXE_GdbObjects.cpp b/EXE_GdbObjects.cpp index 9c79875..1c3f3a6 100644 --- a/EXE_GdbObjects.cpp +++ b/EXE_GdbObjects.cpp @@ -395,6 +395,14 @@ ExeErase( const INTVECTOR& vIds) nId = (( vIds[i] != GDB_ID_SEL) ? GDB_ID_NULL : pGeomDB->GetFirstSelectedObj()) ; } } + // se cancellato pezzo corrente o layer corrente + bool bPrevCmdLog = SetCmdLog( false) ; + if ( bErasedCurrPart) + ExeResetCurrPartLayer() ; + else if ( bErasedCurrLayer) + ExeSetCurrPartLayer( nCurrPartId, ExeGetFirstLayer( nCurrPartId, true)) ; + SetCmdLog( bPrevCmdLog) ; + // dichiaro progetto modificato ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { @@ -402,11 +410,6 @@ ExeErase( const INTVECTOR& vIds) " -- Ok=" + ToString( bOk) ; LOG_INFO( GetCmdLogger(), sLua.c_str()) ; } - // se cancellato pezzo corrente o layer corrente (va qui perchè salva altro comando che è successivo) - if ( bErasedCurrPart) - ExeResetCurrPartLayer() ; - else if ( bErasedCurrLayer) - ExeSetCurrPartLayer( nCurrPartId, ExeGetFirstLayer( nCurrPartId, true)) ; // restituisco risultato return bOk ; } @@ -420,12 +423,15 @@ ExeEmptyGroup( int nId) // svuoto il gruppo bool bOk = pGeomDB->EmptyGroup( nId) ; // se cancellato pezzo corrente o layer corrente + bool bPrevCmdLog = SetCmdLog( false) ; int nCurrPartId = ExeGetCurrPart() ; int nCurrLayerId = ExeGetCurrLayer() ; if ( ! pGeomDB->ExistsObj( nCurrPartId)) ExeResetCurrPartLayer() ; else if ( ! pGeomDB->ExistsObj( nCurrLayerId)) ExeSetCurrPartLayer( nCurrPartId, ExeGetFirstLayer( nCurrPartId, true)) ; + SetCmdLog( bPrevCmdLog) ; + // dichiaro progetto modificato ExeSetModified() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { diff --git a/EXE_GeomDB.cpp b/EXE_GeomDB.cpp index 2935edd..e8851c4 100644 --- a/EXE_GeomDB.cpp +++ b/EXE_GeomDB.cpp @@ -264,7 +264,9 @@ ExeNewFile( void) pGseCtx->m_sFilePath.clear() ; ExeResetModified() ; // aggiorno pezzo/layer correnti + bool bPrevCmdLog = SetCmdLog( false) ; ExeResetCurrPartLayer() ; + SetCmdLog( bPrevCmdLog) ; // aggiornamento gestore lavorazioni ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente @@ -299,7 +301,9 @@ ExeOpenFile( const string& sFilePath) // aggiorno stato file corrente ExeResetModified() ; // aggiorno pezzo/layer correnti + bool bPrevCmdLog = SetCmdLog( false) ; ExeResetCurrPartLayer() ; + SetCmdLog( bPrevCmdLog) ; // aggiornamento gestore lavorazioni ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 39ab9c10b60ee6f5c0a5692b3da81601e274b649..37d4db7d35f98fbf9a896b6cb1632cddb7374156 100644 GIT binary patch delta 97 zcmZ1%y)JsgA2vp#%@@V4Gflq2na5}}Ignd-a{*Tk3sCf++-0W82LxfF21;&>n->Y| cF@rU@0x76sKgP|Iq`|@mn->Y| cF@rU@0x76sKgP|Iq`|@m