-void PartSet_OperationEditLine::keyReleased(const int theKey)
-{
-/* switch (theKey) {
- case Qt::Key_Escape: {
- if (myPointSelectionMode != SM_None)
- emit featureConstructed(feature(), FM_Abort);
- abort();
- }
- break;
- case Qt::Key_Return: {
- if (myPointSelectionMode != SM_None) {
- emit featureConstructed(feature(), FM_Abort);
- myPointSelectionMode = SM_FirstPoint;
- document()->abortOperation();
- }
- else
- myPointSelectionMode = SM_FirstPoint;
- }
- break;
- default:
- break;
+ if (myCurPoint.myIsInitialized) {
+ double aCurX, aCurY;
+ PartSet_Tools::ConvertTo2D(myCurPoint.myPoint, mySketch, theView, aCurX, aCurY);
+
+ double aX, anY;
+ PartSet_Tools::ConvertTo2D(aPoint, mySketch, theView, aX, anY);
+
+ double aDeltaX = aX - aCurX;
+ double aDeltaY = anY - aCurY;
+
+ moveLinePoint(feature(), aDeltaX, aDeltaY, LINE_ATTR_START);
+ moveLinePoint(feature(), aDeltaX, aDeltaY, LINE_ATTR_END);
+
+ /*std::list<XGUI_ViewerPrs>::const_iterator anIt = theSelected.begin(), aLast = theSelected.end();
+ for (; anIt != aLast; anIt++) {
+ boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
+ if (!aFeature)
+ continue;
+ moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_START);
+ moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_END);
+ }*/