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
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_Operation.cpp
diff --git
a/src/ModuleBase/ModuleBase_Operation.cpp
b/src/ModuleBase/ModuleBase_Operation.cpp
index cd728aa7adcb2711218549b172b0062bd6b83df1..a28d62d88e7dcc089b03b95b41beaf2412c84254 100644
(file)
--- a/
src/ModuleBase/ModuleBase_Operation.cpp
+++ b/
src/ModuleBase/ModuleBase_Operation.cpp
@@
-29,6
+29,9
@@
#include <Events_Loop.h>
#include <Events_Loop.h>
+#include <TopoDS.hxx>
+#include <TopoDS_Vertex.hxx>
+
#ifdef _DEBUG
#include <QDebug>
#endif
#ifdef _DEBUG
#include <QDebug>
#endif
@@
-249,6
+252,7
@@
bool ModuleBase_Operation::activateByPreselection()
ModuleBase_ViewerPrs aPrs;
QList<ModuleBase_ModelWidget*>::const_iterator aWIt;
QList<ModuleBase_ViewerPrs>::const_iterator aPIt;
ModuleBase_ViewerPrs aPrs;
QList<ModuleBase_ModelWidget*>::const_iterator aWIt;
QList<ModuleBase_ViewerPrs>::const_iterator aPIt;
+ bool isSet = false;
for (aWIt = aWidgets.constBegin(), aPIt = myPreSelection.constBegin();
(aWIt != aWidgets.constEnd()) && (aPIt != myPreSelection.constEnd());
++aWIt, ++aPIt) {
for (aWIt = aWidgets.constBegin(), aPIt = myPreSelection.constBegin();
(aWIt != aWidgets.constEnd()) && (aPIt != myPreSelection.constEnd());
++aWIt, ++aPIt) {
@@
-256,10
+260,16
@@
bool ModuleBase_Operation::activateByPreselection()
aPrs = (*aPIt);
ModuleBase_WidgetValueFeature aValue;
aValue.setObject(aPrs.object());
aPrs = (*aPIt);
ModuleBase_WidgetValueFeature aValue;
aValue.setObject(aPrs.object());
- if (!aWgt->setValue(&aValue))
+ // Check if the selection has a selected point
+ // for today it is impossible to do because
+ // the selected point demands convertation to Sketch plane 2d
+ if (!aWgt->setValue(&aValue)) {
+ isSet = false;
break;
break;
+ } else
+ isSet = true;
}
}
- if (canBeCommitted()) {
+ if (
isSet &&
canBeCommitted()) {
// if all widgets are filled with selection
commit();
return true;
// if all widgets are filled with selection
commit();
return true;