diff --git a/EXE_GdbPartLayers.cpp b/EXE_GdbPartLayers.cpp index 40721ad..b42c3e8 100644 --- a/EXE_GdbPartLayers.cpp +++ b/EXE_GdbPartLayers.cpp @@ -139,7 +139,7 @@ ExeSetCurrPartLayer( int nPartId, int nLayerId) bOk = false ; } // verifico validità e visibilità layer - if ( pGeomDB->GetParentId( nLayerId) == nPartId && + if ( pGeomDB->GetParentId( nLayerId) == pGseCtx->m_nCurrPart && ExeIsUserObj( pGeomDB, nLayerId) && ExeIsVisibleObj( pGeomDB, nLayerId)) { pGseCtx->m_nCurrLayer = nLayerId ; diff --git a/EXE_GeomDB.cpp b/EXE_GeomDB.cpp index 28b0d70..2935edd 100644 --- a/EXE_GeomDB.cpp +++ b/EXE_GeomDB.cpp @@ -263,6 +263,8 @@ ExeNewFile( void) // aggiorno stato file corrente pGseCtx->m_sFilePath.clear() ; ExeResetModified() ; + // aggiorno pezzo/layer correnti + ExeResetCurrPartLayer() ; // aggiornamento gestore lavorazioni ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente @@ -296,6 +298,8 @@ ExeOpenFile( const string& sFilePath) bOk = bOk && pGseCtx->m_pGeomDB->Load( sFilePath) ; // aggiorno stato file corrente ExeResetModified() ; + // aggiorno pezzo/layer correnti + ExeResetCurrPartLayer() ; // aggiornamento gestore lavorazioni ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 944ba9c..39ab9c1 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ