EgtExecutor :

- inibita registrazione comando mentre si esegue un altro comando.
This commit is contained in:
Dario Sassi
2016-09-16 15:23:18 +00:00
parent 68b7edec5b
commit b53d7867bb
4 changed files with 17 additions and 5 deletions
+11 -5
View File
@@ -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()) {