Sketcher: [skip ci] fix handling of icon search paths when another workbench uses a sketcher command

This commit is contained in:
wmayer
2020-10-01 16:28:23 +02:00
parent 393da0d6d9
commit 7eeec7a599
2 changed files with 11 additions and 8 deletions

View File

@@ -32,6 +32,7 @@
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Language/Translator.h>
#include <Gui/WidgetFactory.h>
#include "Workbench.h"
@@ -100,6 +101,15 @@ PyMOD_INIT_FUNC(SketcherGui)
PyObject* mod = SketcherGui::initModule();
Base::Console().Log("Loading GUI of Sketcher module... done\n");
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/constraints"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/elements"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/general"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/geometry"));
//Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/obsolete"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/pointers"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/splines"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/tools"));
// instantiating the commands
CreateSketcherCommands();
CreateSketcherCommandsCreateGeo();

View File

@@ -42,14 +42,7 @@ class SketcherWorkbench ( Workbench ):
# load the module
import SketcherGui
import Sketcher
Gui.addIconPath(":/icons/constraints")
Gui.addIconPath(":/icons/elements")
Gui.addIconPath(":/icons/general")
Gui.addIconPath(":/icons/geometry")
# Gui.addIconPath(":/icons/obsolete")
Gui.addIconPath(":/icons/pointers")
Gui.addIconPath(":/icons/splines")
Gui.addIconPath(":/icons/tools")
try:
import Profiles
except ImportError: