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 39ab9c1..37d4db7 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ