X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_SketcherMgr.cpp;h=b4cf246eac2e7827d57f60dcd9e7cbe781d99850;hb=857b1f72d9703c46c6c8c9bb239821d314344c86;hp=dbbe99bb0f343e7d8887bef89acdc85d8da6c319;hpb=8648407e479eeffbfbb0a952db8c47ddc8d058aa;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index dbbe99bb0..b4cf246ea 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -11,9 +11,6 @@ #include "PartSet_Tools.h" #include "PartSet_WidgetSketchLabel.h" -#include -#include - #include #include #include @@ -25,14 +22,16 @@ #include #include +#include +#include #include #include #include +#include #include #include -#include -#include #include +#include #include @@ -70,6 +69,7 @@ #include #include +#include #include #include @@ -227,7 +227,9 @@ void PartSet_SketcherMgr::onLeaveViewPort() { myIsMouseOverViewProcessed = false; myIsMouseOverWindow = false; - operationMgr()->onValidateOperation(); + // it is important to validate operation here only if sketch entity create operation is active + // because at this operation we reacts to the mouse leave/enter view port + //operationMgr()->onValidateOperation(); #ifdef DEBUG_MOUSE_OVER_WINDOW_FLAGS qDebug(QString("onLeaveViewPort: %1").arg(mouseOverWindowFlagsInfo()).toStdString().c_str()); #endif @@ -243,6 +245,8 @@ void PartSet_SketcherMgr::onLeaveViewPort() if (myIsPopupMenuActive) return; + operationMgr()->onValidateOperation(); + // 2. if the mouse IS NOT over window, reset the active widget value and hide the presentation ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); XGUI_ModuleConnector* aConnector = dynamic_cast(aWorkshop); @@ -271,6 +275,8 @@ void PartSet_SketcherMgr::onLeaveViewPort() void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel() { + myIsResetCurrentValue = false; + if (isNestedCreateOperation(getCurrentOperation())) return; // it is necessary to save current selection in order to restore it after the values are modifed @@ -306,7 +312,7 @@ void PartSet_SketcherMgr::onValuesChangedInPropertyPanel() return; // visualize the current operation feature - myIsResetCurrentValue = false; + //myIsResetCurrentValue = false; operationMgr()->onValidateOperation(); // the feature is to be erased here, but it is correct to call canDisplayObject because // there can be additional check (e.g. editor widget in distance constraint) @@ -661,6 +667,17 @@ void PartSet_SketcherMgr::launchEditing() } } +bool PartSet_SketcherMgr::sketchSolverError() +{ + bool anError = false; + CompositeFeaturePtr aSketch = activeSketch(); + if (aSketch.get()) { + AttributeStringPtr aAttributeString = aSketch->string(SketchPlugin_Sketch::SOLVER_ERROR()); + anError = !aAttributeString->value().empty(); + } + return anError; +} + const QStringList& PartSet_SketcherMgr::sketchOperationIdList() {