DrawSketchHandler: mechanism to update the cursor
This commit is contained in:
@@ -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<QPixmap> &pixmaps ) {
|
||||
}
|
||||
}
|
||||
|
||||
void DrawSketchHandler::updateCursor()
|
||||
{
|
||||
auto cursorstring = getCrosshairCursorString();
|
||||
|
||||
if(cursorstring != QString::fromLatin1("None"))
|
||||
setCrosshairCursor(cursorstring);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::applyCursor(void)
|
||||
{
|
||||
applyCursor(actCursor);
|
||||
|
||||
@@ -162,6 +162,7 @@ protected:
|
||||
void setSvgCursor(const QString &svgName, int x, int y,
|
||||
const std::map<unsigned long, unsigned long>& colorMapping = std::map<unsigned long, unsigned long>());
|
||||
void addCursorTail(std::vector<QPixmap> &pixmaps);
|
||||
void updateCursor();
|
||||
void unsetCursor(void);
|
||||
void applyCursor(void);
|
||||
void applyCursor(QCursor &newCursor);
|
||||
|
||||
Reference in New Issue
Block a user