Skip to content

Commit

Permalink
Gui: [skip ci] fixes: Std_DlgCustomize: commands can get dropped from…
Browse files Browse the repository at this point in the history
… custom toolbars
  • Loading branch information
wwmayer committed Apr 30, 2020
1 parent daa6330 commit 607c3a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Gui/DlgToolbarsImp.cpp
Expand Up @@ -293,6 +293,14 @@ void DlgCustomToolbars::importCustomToolbars(const QByteArray& name)
item->setIcon(0, BitmapFactory().iconFromTheme(pCmd->getPixmap()));
item->setSizeHint(0, QSize(32, 32));
}
else {
// If corresponding module is not yet loaded do not lose the entry
QTreeWidgetItem* item = new QTreeWidgetItem(toplevel);
item->setText(0, tr("%1 module not loaded").arg(QString::fromStdString(it2->second)));
item->setData(0, Qt::UserRole, QByteArray(it2->first.c_str()));
item->setData(0, Qt::WhatsThisPropertyRole, QByteArray(it2->second.c_str()));
item->setSizeHint(0, QSize(32, 32));
}
}
}
}
Expand Down Expand Up @@ -331,6 +339,10 @@ void DlgCustomToolbars::exportCustomToolbars(const QByteArray& workbench)
if (pCmd) {
hToolGrp->SetASCII(pCmd->getName(), pCmd->getAppModuleName());
}
else {
QByteArray moduleName = child->data(0, Qt::WhatsThisPropertyRole).toByteArray();
hToolGrp->SetASCII(commandName, moduleName);
}
}
}
}
Expand Down

0 comments on commit 607c3a6

Please sign in to comment.