+ when checking for custom toolbars do not auto-create sub-groups in user parameters

This commit is contained in:
wmayer
2014-12-06 14:46:08 +01:00
parent c931bee01d
commit ec4a496866

View File

@@ -224,7 +224,12 @@ void DlgCustomToolbars::importCustomToolbars(const QByteArray& name)
{
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Workbench");
const char* subgroup = (type == Toolbar ? "Toolbar" : "Toolboxbar");
hGrp = hGrp->GetGroup(name.constData())->GetGroup(subgroup);
if (!hGrp->HasGroup(name.constData()))
return;
hGrp = hGrp->GetGroup(name.constData());
if (!hGrp->HasGroup(subgroup))
return;
hGrp = hGrp->GetGroup(subgroup);
std::vector<Base::Reference<ParameterGrp> > hGrps = hGrp->GetGroups();
CommandManager& rMgr = Application::Instance->commandManager();