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
refs #226: the next non-filled widget should have focus after preselection processing
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetPoint2D.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
b/src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
index c6d341d002134e20b5c797013e147e080c3fb4c4..21cef047dc80351fff5b0ca7a32d1aaa36d132b8 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
@@
-23,7
+23,6
@@
#include <QGridLayout>
#include <QLabel>
#include <QEvent>
#include <QGridLayout>
#include <QLabel>
#include <QEvent>
-#include <QKeyEvent>
#include <cfloat>
#include <climits>
#include <cfloat>
#include <climits>
@@
-108,11
+107,18
@@
bool ModuleBase_WidgetPoint2D::storeValue() const
boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
aData->attribute(attributeID()));
boost::shared_ptr<ModelAPI_Data> aData = myFeature->data();
boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
aData->attribute(attributeID()));
-
+
ModuleBase_WidgetPoint2D* that = (ModuleBase_WidgetPoint2D*) this;
bool isBlocked = that->blockSignals(true);
ModuleBase_WidgetPoint2D* that = (ModuleBase_WidgetPoint2D*) this;
bool isBlocked = that->blockSignals(true);
+ bool isImmutable = aPoint->setImmutable(true);
+#ifdef _DEBUG
+ std::string _attr_name = myAttributeID;
+ double _X = myXSpin->value();
+ double _Y = myYSpin->value();
+#endif
aPoint->setValue(myXSpin->value(), myYSpin->value());
updateObject(myFeature);
aPoint->setValue(myXSpin->value(), myYSpin->value());
updateObject(myFeature);
+ aPoint->setImmutable(isImmutable);
that->blockSignals(isBlocked);
return true;
that->blockSignals(isBlocked);
return true;
@@
-124,6
+130,11
@@
bool ModuleBase_WidgetPoint2D::restoreValue()
boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
aData->attribute(attributeID()));
boost::shared_ptr<GeomDataAPI_Point2D> aPoint = boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(
aData->attribute(attributeID()));
+#ifdef _DEBUG
+ std::string _attr_name = myAttributeID;
+ double _X = aPoint->x();
+ double _Y = aPoint->y();
+#endif
bool isBlocked = this->blockSignals(true);
myXSpin->setValue(aPoint->x());
myYSpin->setValue(aPoint->y());
bool isBlocked = this->blockSignals(true);
myXSpin->setValue(aPoint->x());
myYSpin->setValue(aPoint->y());