added selection of end-points to line touch-select
This commit is contained in:
@@ -1934,6 +1934,7 @@ void ViewProviderSketch::doBoxSelection(const SbVec2s &startPos, const SbVec2s &
|
||||
int VertexId = -1; // the loop below should be in sync with the main loop in ViewProviderSketch::draw
|
||||
// so that the vertex indices are calculated correctly
|
||||
int GeoId = 0;
|
||||
|
||||
bool touchMode = false;
|
||||
//check if selection goes from the right to the left side (for touch-selection where even partially boxed objects get selected)
|
||||
if(corners[0].getValue()[0] > corners[1].getValue()[0])
|
||||
@@ -1985,6 +1986,12 @@ void ViewProviderSketch::doBoxSelection(const SbVec2s &startPos, const SbVec2s &
|
||||
std::stringstream ss;
|
||||
ss << "Edge" << GeoId + 1;
|
||||
Gui::Selection().addSelection(doc->getName(), sketchObject->getNameInDocument(), ss.str().c_str());
|
||||
} else
|
||||
//check if line intersects with (boundbox of) polygon
|
||||
if(touchMode && polygon.CalcBoundBox().Intersect(Base::Line2d(Base::Vector2d(pnt1.x, pnt1.y), Base::Vector2d(pnt2.x, pnt2.y))) ){
|
||||
std::stringstream ss;
|
||||
ss << "Edge" << GeoId + 1;
|
||||
Gui::Selection().addSelection(doc->getName(), sketchObject->getNameInDocument(), ss.str().c_str());
|
||||
}
|
||||
|
||||
} else if ((*it)->getTypeId() == Part::GeomCircle::getClassTypeId()) {
|
||||
|
||||
Reference in New Issue
Block a user