Sketcher: [skip ci] fix handling of icon search paths when another workbench uses a sketcher command
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user