mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-15 17:14:39 +00:00
added new feature to editor and removed a first bug on MeshState
(should be present another one)
This commit is contained in:
parent
3a745e603e
commit
85de91b6b3
@ -322,19 +322,21 @@ void PluginManager::loadXMLPlugin( const QString& fileName )
|
||||
QString pname = pluginfo->pluginScriptName();
|
||||
if (pname != "")
|
||||
{
|
||||
pluginnamespaces << pname;
|
||||
QString plugnamespace = pluginNameSpace() + "." + pname;
|
||||
pluginnamespaces << plugnamespace;
|
||||
scriptplugcode += pluginNameSpace() + "." + pname + " = { };\n";
|
||||
QStringList filters = pluginfo->filterNames();
|
||||
foreach(QString filter,filters)
|
||||
{
|
||||
QString completename = plugnamespace;
|
||||
fc.act = new QAction(filter,par);
|
||||
stringXMLFilterMap.insert(filter,fc);
|
||||
QString filterFunction = pluginfo->filterScriptCode(filter);
|
||||
if (filterFunction == "")
|
||||
filterFunction = gen.funCodeGenerator(filter,*pluginfo);
|
||||
QString jname = pluginfo->filterAttribute(filter,MLXMLElNames::filterScriptFunctName);
|
||||
QString completename = pluginNameSpace() + "." + pname + "." + jname;
|
||||
filterscriptnames << jname;
|
||||
completename += "." + jname;
|
||||
filterscriptnames << completename;
|
||||
scriptplugcode += completename + " = " + filterFunction + "\n";
|
||||
completename += "(" + gen.parNames(filter,*pluginfo) + ")";
|
||||
filtersign << completename;
|
||||
|
||||
@ -337,7 +337,9 @@ Q_INVOKABLE int MeshDocumentSI::currentId()
|
||||
|
||||
Q_INVOKABLE int MeshDocumentSI::setCurrent(const int meshId)
|
||||
{
|
||||
int id = md->mm()->id();
|
||||
int id = -1;
|
||||
if (md->mm() != NULL)
|
||||
id = md->mm()->id();
|
||||
if (md->getMesh(meshId) != NULL)
|
||||
{
|
||||
md->setCurrentMesh(meshId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user