Skip to content

Commit

Permalink
+ fix bug when releasing button after dragging point or curve
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Aug 2, 2014
1 parent c836dab commit 578fbbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -682,7 +682,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
Mode = STATUS_NONE;
return true;
case STATUS_SKETCH_DragPoint:
if (edit->DragPoint != -1 && pp) {
if (edit->DragPoint != -1) {
int GeoId;
Sketcher::PointPos PosId;
getSketchObject()->getGeoVertexIndex(edit->DragPoint, GeoId, PosId);
Expand All @@ -702,7 +702,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
Mode = STATUS_NONE;
return true;
case STATUS_SKETCH_DragCurve:
if (edit->DragCurve != -1 && pp) {
if (edit->DragCurve != -1) {
const Part::Geometry *geo = getSketchObject()->getGeometry(edit->DragCurve);
if (geo->getTypeId() == Part::GeomLineSegment::getClassTypeId() ||
geo->getTypeId() == Part::GeomArcOfCircle::getClassTypeId() ||
Expand All @@ -723,10 +723,10 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
Mode = STATUS_NONE;
return true;
case STATUS_SKETCH_DragConstraint:
if ((edit->DragConstraintSet.empty() == false) && pp) {
if (edit->DragConstraintSet.empty() == false) {
Gui::Command::openCommand("Drag Constraint");
for(std::set<int>::iterator it = edit->DragConstraintSet.begin();
it != edit->DragConstraintSet.end(); ++it) {
Gui::Command::openCommand("Drag Constraint");
moveConstraint(*it, Base::Vector2D(x, y));
//updateColor();
}
Expand Down

0 comments on commit 578fbbe

Please sign in to comment.