Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Selection validators improvements
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_OperationFeatureCreate.cpp
diff --git
a/src/PartSet/PartSet_OperationFeatureCreate.cpp
b/src/PartSet/PartSet_OperationFeatureCreate.cpp
index a1652fc482c575cebb7274b876077ddd138c7aaf..d1d5d409b42d33d6fef7bc2c638862227450ed61 100644
(file)
--- a/
src/PartSet/PartSet_OperationFeatureCreate.cpp
+++ b/
src/PartSet/PartSet_OperationFeatureCreate.cpp
@@
-24,8
+24,8
@@
#include <ModuleBase_OperationDescription.h>
#include <ModuleBase_WidgetPoint2D.h>
#include <ModuleBase_WidgetValueFeature.h>
#include <ModuleBase_OperationDescription.h>
#include <ModuleBase_WidgetPoint2D.h>
#include <ModuleBase_WidgetValueFeature.h>
+#include <ModuleBase_ViewerPrs.h>
-#include <XGUI_ViewerPrs.h>
#include <XGUI_Constants.h>
#include <V3d_View.hxx>
#include <XGUI_Constants.h>
#include <V3d_View.hxx>
@@
-83,8
+83,8
@@
std::list<int> PartSet_OperationFeatureCreate::getSelectionModes(FeaturePtr theF
return aModes;
}
return aModes;
}
-void PartSet_OperationFeatureCreate::initSelection(const std::list<
XGUI
_ViewerPrs>& theSelected,
- const std::list<
XGUI
_ViewerPrs>& /*theHighlighted*/)
+void PartSet_OperationFeatureCreate::initSelection(const std::list<
ModuleBase
_ViewerPrs>& theSelected,
+ const std::list<
ModuleBase
_ViewerPrs>& /*theHighlighted*/)
{
myPreSelection = theSelected;
}
{
myPreSelection = theSelected;
}
@@
-101,8
+101,8
@@
FeaturePtr PartSet_OperationFeatureCreate::sketch() const
}
void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle(V3d_View) theView,
}
void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle(V3d_View) theView,
- const std::list<
XGUI
_ViewerPrs>& theSelected,
- const std::list<
XGUI
_ViewerPrs>& /*theHighlighted*/)
+ const std::list<
ModuleBase
_ViewerPrs>& theSelected,
+ const std::list<
ModuleBase
_ViewerPrs>& /*theHighlighted*/)
{
if (canBeCommitted())
{
{
if (canBeCommitted())
{
@@
-113,14
+113,14
@@
void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle
return;
}
return;
}
- double aX = 0, anY = 0;
-
gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theView);
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 {
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
{
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()) {
}
FeaturePtr aFeature;
if (!theSelected.empty()) {
-
XGUI
_ViewerPrs aPrs = theSelected.front();
+
ModuleBase
_ViewerPrs aPrs = theSelected.front();
aFeature = aPrs.feature();
}
else
aFeature = aPrs.feature();
}
else
@@
-190,7
+190,7
@@
void PartSet_OperationFeatureCreate::onWidgetActivated(ModuleBase_ModelWidget* t
{
myActiveWidget = theWidget;
if ((myPreSelection.size() > 0) && myActiveWidget) {
{
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)) {
ModuleBase_WidgetValueFeature aValue;
aValue.setFeature(aPrs.feature());
if (myActiveWidget->setValue(&aValue)) {