Sketcher: DrawSketchHandler - refactor functions to draw/clear edit curve and markers
This commit is contained in:
committed by
abdullahtahiriyo
parent
8baf75af84
commit
3ad624236b
@@ -337,8 +337,8 @@ void DrawSketchHandler::deactivate()
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::setConstraintSelectability(*sketchgui, true);
|
||||
|
||||
// clear temporary Curve and Markers from the scenograph
|
||||
drawEdit(std::vector<Base::Vector2d>());
|
||||
drawEditMarkers(std::vector<Base::Vector2d>());
|
||||
clearEdit();
|
||||
clearEditMarkers();
|
||||
resetPositionText();
|
||||
unsetCursor();
|
||||
setAngleSnapping(false);
|
||||
@@ -1087,17 +1087,17 @@ void DrawSketchHandler::resetPositionText()
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::resetPositionText(*sketchgui);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEdit(const std::vector<Base::Vector2d>& EditCurve)
|
||||
void DrawSketchHandler::drawEdit(const std::vector<Base::Vector2d>& EditCurve) const
|
||||
{
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::drawEdit(*sketchgui, EditCurve);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEdit(const std::list<std::vector<Base::Vector2d>>& list)
|
||||
void DrawSketchHandler::drawEdit(const std::list<std::vector<Base::Vector2d>>& list) const
|
||||
{
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::drawEdit(*sketchgui, list);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEdit(const std::vector<Part::Geometry*>& geometries)
|
||||
void DrawSketchHandler::drawEdit(const std::vector<Part::Geometry*>& geometries) const
|
||||
{
|
||||
static CurveConverter c;
|
||||
|
||||
@@ -1106,6 +1106,16 @@ void DrawSketchHandler::drawEdit(const std::vector<Part::Geometry*>& geometries)
|
||||
drawEdit(list);
|
||||
}
|
||||
|
||||
void DrawSketchHandler::clearEdit() const
|
||||
{
|
||||
drawEdit(std::vector<Base::Vector2d>());
|
||||
}
|
||||
|
||||
void DrawSketchHandler::clearEditMarkers() const
|
||||
{
|
||||
drawEditMarkers(std::vector<Base::Vector2d>());
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawPositionAtCursor(const Base::Vector2d& position)
|
||||
{
|
||||
setPositionText(position);
|
||||
@@ -1147,7 +1157,7 @@ QString DrawSketchHandler::getToolWidgetHeaderText() const
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEditMarkers(const std::vector<Base::Vector2d>& EditMarkers,
|
||||
unsigned int augmentationlevel)
|
||||
unsigned int augmentationlevel) const
|
||||
{
|
||||
ViewProviderSketchDrawSketchHandlerAttorney::drawEditMarkers(*sketchgui,
|
||||
EditMarkers,
|
||||
|
||||
@@ -262,11 +262,15 @@ protected:
|
||||
qreal devicePixelRatio();
|
||||
//@}
|
||||
|
||||
void drawEdit(const std::vector<Base::Vector2d>& EditCurve);
|
||||
void drawEdit(const std::list<std::vector<Base::Vector2d>>& list);
|
||||
void drawEdit(const std::vector<Part::Geometry*>& geometries);
|
||||
void drawEdit(const std::vector<Base::Vector2d>& EditCurve) const;
|
||||
void drawEdit(const std::list<std::vector<Base::Vector2d>>& list) const;
|
||||
void drawEdit(const std::vector<Part::Geometry*>& geometries) const;
|
||||
void drawEditMarkers(const std::vector<Base::Vector2d>& EditMarkers,
|
||||
unsigned int augmentationlevel = 0);
|
||||
unsigned int augmentationlevel = 0) const;
|
||||
|
||||
void clearEdit() const;
|
||||
void clearEditMarkers() const;
|
||||
|
||||
void setAxisPickStyle(bool on);
|
||||
void moveCursorToSketchPoint(Base::Vector2d point);
|
||||
void preselectAtPoint(Base::Vector2d point);
|
||||
|
||||
Reference in New Issue
Block a user