Skip to content
Snippets Groups Projects
Commit c9e94266 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent b81017d0
No related branches found
No related tags found
No related merge requests found
...@@ -72,6 +72,16 @@ GModel *GModel::current(int index) ...@@ -72,6 +72,16 @@ GModel *GModel::current(int index)
return list[_current]; return list[_current];
} }
int GModel::setCurrent(GModel *m)
{
for (unsigned int i = 0; i < list.size(); i++){
if (list[i] == m){
_current = i;
return i;
}
}
}
GModel *GModel::findByName(std::string name) GModel *GModel::findByName(std::string name)
{ {
// return last mesh with given name // return last mesh with given name
......
...@@ -122,16 +122,7 @@ class GModel ...@@ -122,16 +122,7 @@ class GModel
static GModel *current(int index=-1); static GModel *current(int index=-1);
// sets a model to current // sets a model to current
static int setCurrent(GModel *m){ static int setCurrent(GModel *m);
for (int i=0;i<list.size();i++){
if (list[i] ==m){
_current = i;
return i;
}
}
}
// find a model by name // find a model by name
static GModel *findByName(std::string name); static GModel *findByName(std::string name);
......
#include "LuaBindings_Geo.h" #include "LuaBindings_Geo.h"
#include "OpenFile.h" #include "OpenFile.h"
#include "CreateFile.h" #include "CreateFile.h"
#if defined(HAVE_LUA)
// define the name of the object that will be used // define the name of the object that will be used
// in Lua // in Lua
...@@ -49,3 +52,5 @@ int LuaGModel::save(lua_State *L){ ...@@ -49,3 +52,5 @@ int LuaGModel::save(lua_State *L){
GModel::setCurrent(temp); GModel::setCurrent(temp);
return 1; return 1;
} }
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment