X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationFeatureCreate.cpp;h=d1d5d409b42d33d6fef7bc2c638862227450ed61;hb=47c18d4de2719126f6b045b5c37525cd8f170aa1;hp=a1652fc482c575cebb7274b876077ddd138c7aaf;hpb=11496be069750941ff9cbcef21088a56bfd32cdf;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index a1652fc48..d1d5d409b 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -24,8 +24,8 @@ #include #include #include +#include -#include #include #include @@ -83,8 +83,8 @@ std::list PartSet_OperationFeatureCreate::getSelectionModes(FeaturePtr theF return aModes; } -void PartSet_OperationFeatureCreate::initSelection(const std::list& theSelected, - const std::list& /*theHighlighted*/) +void PartSet_OperationFeatureCreate::initSelection(const std::list& theSelected, + const std::list& /*theHighlighted*/) { myPreSelection = theSelected; } @@ -101,8 +101,8 @@ FeaturePtr PartSet_OperationFeatureCreate::sketch() const } void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle(V3d_View) theView, - const std::list& theSelected, - const std::list& /*theHighlighted*/) + const std::list& theSelected, + const std::list& /*theHighlighted*/) { if (canBeCommitted()) { @@ -113,14 +113,14 @@ void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle return; } - double aX = 0, anY = 0; - gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theView); + double aX = aPoint.X(), anY = aPoint.Y(); + if (theSelected.empty()) { PartSet_Tools::convertTo2D(aPoint, sketch(), theView, aX, anY); } else { - XGUI_ViewerPrs aPrs = theSelected.front(); + ModuleBase_ViewerPrs aPrs = theSelected.front(); const TopoDS_Shape& aShape = aPrs.shape(); if (!aShape.IsNull()) // the point is selected { @@ -147,7 +147,7 @@ void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle } FeaturePtr aFeature; if (!theSelected.empty()) { - XGUI_ViewerPrs aPrs = theSelected.front(); + ModuleBase_ViewerPrs aPrs = theSelected.front(); aFeature = aPrs.feature(); } else @@ -190,7 +190,7 @@ void PartSet_OperationFeatureCreate::onWidgetActivated(ModuleBase_ModelWidget* t { myActiveWidget = theWidget; if ((myPreSelection.size() > 0) && myActiveWidget) { - const XGUI_ViewerPrs& aPrs = myPreSelection.front(); + const ModuleBase_ViewerPrs& aPrs = myPreSelection.front(); ModuleBase_WidgetValueFeature aValue; aValue.setFeature(aPrs.feature()); if (myActiveWidget->setValue(&aValue)) {