From c0fb5b20106e8a004a656f94f66363f5bc6c08c5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 4 Jan 2017 07:38:01 +0000 Subject: [PATCH] EgtExecutor : - migliorata gestione aggiornamento dati lavorazioni su nuovo e apri file. --- EXE_GeomDB.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/EXE_GeomDB.cpp b/EXE_GeomDB.cpp index 9f44a7b..678598b 100644 --- a/EXE_GeomDB.cpp +++ b/EXE_GeomDB.cpp @@ -267,8 +267,9 @@ ExeNewFile( void) bool bPrevCmdLog = SetCmdLog( false) ; ExeResetCurrPartLayer() ; SetCmdLog( bPrevCmdLog) ; - // aggiornamento gestore lavorazioni - ExeUpdateMachMgr() ; + // aggiornamento gestore lavorazioni (se installato) + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { string sLua = "EgtNewFile()" @@ -293,7 +294,8 @@ ExeOpenFile( const string& sFilePath) if ( pGseCtx->m_pScene != nullptr) bOk = bOk && pGseCtx->m_pScene->UnloadAllTextures() ; // pulizia gestore lavorazioni (necessaria qui) - ExeUpdateMachMgr() ; + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // imposto path corrente del file pGseCtx->m_sFilePath = sFilePath ; // carico il file @@ -305,7 +307,8 @@ ExeOpenFile( const string& sFilePath) ExeResetCurrPartLayer() ; SetCmdLog( bPrevCmdLog) ; // aggiornamento gestore lavorazioni - ExeUpdateMachMgr() ; + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { string sLua = "EgtOpenFile('" + StringToLuaString( sFilePath) + "')" +