#include "PartSet_Tools.h"
#include "PartSet_WidgetSketchLabel.h"
-#include <ModuleBase_WidgetEditor.h>
-#include <ModuleBase_ModelWidget.h>
-
#include <XGUI_ModuleConnector.h>
#include <XGUI_Displayer.h>
#include <XGUI_Workshop.h>
#include <XGUI_ViewerProxy.h>
#include <XGUI_OperationMgr.h>
+#include <ModuleBase_IPropertyPanel.h>
+#include <ModuleBase_ISelection.h>
#include <ModuleBase_IViewer.h>
#include <ModuleBase_IWorkshop.h>
#include <ModuleBase_IViewWindow.h>
+#include <ModuleBase_ModelWidget.h>
#include <ModuleBase_Operation.h>
#include <ModuleBase_OperationFeature.h>
-#include <ModuleBase_ISelection.h>
-#include <ModuleBase_IPropertyPanel.h>
#include <ModuleBase_Operation.h>
+#include <ModuleBase_WidgetEditor.h>
#include <GeomDataAPI_Point2D.h>
#include <ModelAPI_Events.h>
#include <ModelAPI_Session.h>
+#include <ModelAPI_AttributeString.h>
#include <QMouseEvent>
#include <QApplication>
{
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
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<XGUI_ModuleConnector*>(aWorkshop);
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
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)
}
}
+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()
{