From 79b4270dcabbab381c79f80bdb6fae7e9af28807 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 16 Jan 2017 19:20:34 +0000 Subject: [PATCH] EgtExecutor : - aggiunta funzione Lua EgtGetModified - ricompilato per correzioni a template del gestore di Lua. --- EXE_GeomDB.cpp | 2 +- LUA_GeomDB.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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) ;