EgtInterface 1.6a7 :

- aggiunta gestione nome file di progetto e suo stato
- aggiunta gestione pezzo e layer
- riordino generale.
This commit is contained in:
Dario Sassi
2015-01-30 08:16:05 +00:00
parent f039e22297
commit 0c41c8c631
20 changed files with 868 additions and 178 deletions
+20
View File
@@ -227,6 +227,7 @@ __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter)
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// eseguo la copia
int nNewId = pGeomDB->Copy( nSouId, GDB_ID_NULL, nRefId, nSonBeforeAfter) ;
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua ;
@@ -253,6 +254,7 @@ __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter)
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// eseguo la copia mantenendo la posizione in globale
int nNewId = pGeomDB->CopyGlob( nSouId, GDB_ID_NULL, nRefId, nSonBeforeAfter) ;
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua ;
@@ -279,6 +281,7 @@ __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter)
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// eseguo la rilocazione
bool bOk = pGeomDB->Relocate( nSouId, nRefId, nSonBeforeAfter) ;
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua ;
@@ -305,6 +308,7 @@ __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter)
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// eseguo la rilocazione mantenendo la posizione in globale
bool bOk = pGeomDB->RelocateGlob( nSouId, nRefId, nSonBeforeAfter) ;
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua ;
@@ -331,6 +335,7 @@ __stdcall EgtChangeId( int nId, int nNewId)
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// eseguo cambio di Id
bool bOk = pGeomDB->ChangeId( nId, nNewId) ;
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtChangeId(" + ToString( nId) + "," +
@@ -351,16 +356,31 @@ __stdcall EgtErase( int nId)
// eseguo cancellazione singola
if ( nId != GDB_ID_SEL) {
bOk = pGeomDB->Erase( nId) ;
// se cancellato pezzo corrente o layer corrente
int nCurrPartId = EgtGetCurrPart() ;
if ( nId == nCurrPartId)
EgtResetCurrPartLayer() ;
else if ( nId == EgtGetCurrLayer())
EgtSetCurrPartLayer( nCurrPartId, EgtGetFirstVisibleLayer( nCurrPartId)) ;
}
// eseguo cancellazione dei selezionati
else {
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
// cancello
if ( ! pGeomDB->Erase( nI))
bOk = false ;
// se cancellato pezzo corrente o layer corrente
int nCurrPartId = EgtGetCurrPart() ;
if ( nI == nCurrPartId)
EgtResetCurrPartLayer() ;
else if ( nI == EgtGetCurrLayer())
EgtSetCurrPartLayer( nCurrPartId, EgtGetFirstVisibleLayer( nCurrPartId)) ;
// passo al successivo
nI = pGeomDB->GetFirstSelectedObj() ;
}
}
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtErase(" + ( nId != GDB_ID_SEL ? ToString( nId) : "GDB_ID_SEL") + ")" +