diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp index d9f9c897a6..6101114aef 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp @@ -54,7 +54,6 @@ #include "ViewProviderSketch.h" #include "CommandConstraints.h" - using namespace SketcherGui; using namespace Sketcher; @@ -230,10 +229,7 @@ void DrawSketchHandler::activate(ViewProviderSketch * vp) { sketchgui = vp; - auto cursorstring = getCrosshairCursorString(); - - if(cursorstring != QString::fromLatin1("None")) - setCrosshairCursor(cursorstring); + updateCursor(); this->preActivated(); this->activated(); @@ -426,6 +422,14 @@ void DrawSketchHandler::addCursorTail( std::vector &pixmaps ) { } } +void DrawSketchHandler::updateCursor() +{ + auto cursorstring = getCrosshairCursorString(); + + if(cursorstring != QString::fromLatin1("None")) + setCrosshairCursor(cursorstring); +} + void DrawSketchHandler::applyCursor(void) { applyCursor(actCursor); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.h b/src/Mod/Sketcher/Gui/DrawSketchHandler.h index 61d3d55fea..5a2ee3c695 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.h @@ -162,6 +162,7 @@ protected: void setSvgCursor(const QString &svgName, int x, int y, const std::map& colorMapping = std::map()); void addCursorTail(std::vector &pixmaps); + void updateCursor(); void unsetCursor(void); void applyCursor(void); void applyCursor(QCursor &newCursor);