EgtExecutor :
- aggiunta funzione Exe e Lua DuploGetModified.
This commit is contained in:
@@ -731,10 +731,28 @@ ExeDuploSetModified( int nSouId)
|
||||
// Verifico sia un pezzo
|
||||
if ( ! ExeIsPart( nSouId))
|
||||
return false ;
|
||||
// Verifico ci siano dei duplicati che dipendono dal pezzo
|
||||
if ( ! pGeomDB->ExistsInfo( nSouId, GDB_SI_DUPLIST))
|
||||
return true ;
|
||||
// Imposto il flag di modificato
|
||||
return pGeomDB->SetInfo( nSouId, GDB_SI_DUPMODIF, true) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeDuploGetModified( int nSouId, bool& bModif)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// Verifico sia un pezzo
|
||||
if ( ! ExeIsPart( nSouId))
|
||||
return false ;
|
||||
// recupero il flag di modificato
|
||||
if ( ! pGeomDB->GetInfo( nSouId, GDB_SI_DUPMODIF, bModif))
|
||||
bModif = false ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeDuploUpdate( int nSouId)
|
||||
|
||||
@@ -469,6 +469,25 @@ LuaDuploSetModified( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaDuploGetModified( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nSouId
|
||||
int nSouId ;
|
||||
LuaCheckParam( L, 1, nSouId)
|
||||
LuaClearStack( L) ;
|
||||
// recupero lo stato di modifica del pezzo
|
||||
bool bModif ;
|
||||
bool bOk = ExeDuploGetModified( nSouId, bModif) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, bModif) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaDuploUpdate( lua_State* L)
|
||||
@@ -549,6 +568,7 @@ LuaInstallGdbPartLayer( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploCount", LuaDuploCount) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploList", LuaDuploList) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploSetModified", LuaDuploSetModified) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploGetModified", LuaDuploGetModified) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploUpdate", LuaDuploUpdate) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtIsDuplo", LuaIsDuplo) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDuploGetOriginal", LuaDuploGetOriginal) ;
|
||||
|
||||
Reference in New Issue
Block a user