mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
glarea: Don't crash on unknown decorator name.
This commit is contained in:
parent
1c5182a4c0
commit
6a8ee72aab
@ -1404,6 +1404,16 @@ void GLArea::updateDecorator(QString name, bool toggle, bool stateToSet)
|
||||
{
|
||||
makeCurrent();
|
||||
MeshDecorateInterface *iDecorateTemp = this->mw()->PM.getDecoratorInterfaceByName(name);
|
||||
if (!iDecorateTemp) {
|
||||
this->Logf(GLLogStream::SYSTEM,"Could not get Decorate interface %s", qUtf8Printable(name));
|
||||
this->Logf(GLLogStream::SYSTEM,"Known decorate interfaces:");
|
||||
for (auto tt : this->mw()->PM.meshDecoratePlugins()) {
|
||||
for (auto action : tt->actions()) {
|
||||
this->Logf(GLLogStream::SYSTEM,"- %s", qUtf8Printable(tt->decorationName(action)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
QAction *action = iDecorateTemp->action(name);
|
||||
|
||||
if(iDecorateTemp->getDecorationClass(action)== MeshDecorateInterface::PerDocument)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user