diff --git a/EXE_GeomDB.cpp b/EXE_GeomDB.cpp index 678598b..0cf68ea 100644 --- a/EXE_GeomDB.cpp +++ b/EXE_GeomDB.cpp @@ -243,7 +243,7 @@ ExeGetModified( void) { GseContext* pGseCtx = GetCurrGseContext() ; VERIFY_CTX_GEOMDB( pGseCtx, false) - // imposto il flag + // restituisco il flag return pGseCtx->m_bModified ; } diff --git a/LUA_GeomDB.cpp b/LUA_GeomDB.cpp index 0748069..ad0e3c1 100644 --- a/LUA_GeomDB.cpp +++ b/LUA_GeomDB.cpp @@ -211,6 +211,19 @@ LuaGetEnableModified( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaGetModified( lua_State* L) +{ + // nessun parametro + LuaClearStack( L) ; + // restituisco il flag di modificato + bool bOk = ExeGetModified() ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaNewFile( lua_State* L) @@ -310,6 +323,7 @@ LuaInstallGeomDB( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtEnableModified", LuaEnableModified) ; bOk = bOk && luaMgr.RegisterFunction( "EgtDisableModified", LuaDisableModified) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetEnableModified", LuaGetEnableModified) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtGetModified", LuaGetModified) ; bOk = bOk && luaMgr.RegisterFunction( "EgtNewFile", LuaNewFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtOpenFile", LuaOpenFile) ; bOk = bOk && luaMgr.RegisterFunction( "EgtInsertFile", LuaInsertFile) ;