if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent))
return;
- get2dPoint(theWnd, theEvent, myClickedPoint);
+ //get2dPoint(theWnd, theEvent, myClickedPoint);
if (!(theEvent->buttons() & Qt::LeftButton))
return;
ModuleBase_Operation* aOp = getCurrentOperation();
if (aOp) {
if (isNestedSketchOperation(aOp)) {
- get2dPoint(theWnd, theEvent, myClickedPoint);
+ //get2dPoint(theWnd, theEvent, myClickedPoint);
// Only for sketcher operations
if (myIsDragging) {
}
}
- myClickedPoint.clear();
+ //myClickedPoint.clear();
if (myIsDragging) {
// 1. the current selection is saved in the mouse press method in order to restore it after moving
XGUI_PropertyPanel* aPropertyPanel = aWorkshop->propertyPanel();
if (aPropertyPanel) {
- connect(aPropertyPanel, SIGNAL(beforeWidgetActivated(ModuleBase_ModelWidget*)),
- this, SLOT(onBeforeWidgetActivated(ModuleBase_ModelWidget*)));
+ //connect(aPropertyPanel, SIGNAL(beforeWidgetActivated(ModuleBase_ModelWidget*)),
+ // this, SLOT(onBeforeWidgetActivated(ModuleBase_ModelWidget*)));
connect(aPropertyPanel, SIGNAL(noMoreWidgets(const std::string&)),
aReentranceMgr, SLOT(onNoMoreWidgets(const std::string&)));
connect(aContextMenuMgr, SIGNAL(afterContextMenu()), this, SLOT(onAfterContextMenu()));
}
-void PartSet_SketcherMgr::onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget)
-{
- if (!myClickedPoint.myIsInitialized)
- return;
+//void PartSet_SketcherMgr::onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget)
+//{
+ //if (!myClickedPoint.myIsInitialized)
+ // return;
- ModuleBase_Operation* aOperation = getCurrentOperation();
+ //ModuleBase_Operation* aOperation = getCurrentOperation();
// the distance constraint feature should not use the clickedd point
// this is workaround in order to don't throw down the flyout point value,
// set by execute() method of these type of features
- if (isDistanceOperation(aOperation))
- return;
+ //if (isDistanceOperation(aOperation))
+ // return;
- PartSet_WidgetPoint2D* aPnt2dWgt = dynamic_cast<PartSet_WidgetPoint2D*>(theWidget);
- if (aPnt2dWgt) {
- aPnt2dWgt->setPoint(myClickedPoint.myCurX, myClickedPoint.myCurY);
- }
-}
+ //PartSet_WidgetPoint2D* aPnt2dWgt = dynamic_cast<PartSet_WidgetPoint2D*>(theWidget);
+ //if (aPnt2dWgt) {
+ // aPnt2dWgt->setPoint(myClickedPoint.myCurX, myClickedPoint.myCurY);
+ //}
+//}
void PartSet_SketcherMgr::onBeforeContextMenu()
{
void PartSet_SketcherMgr::clearClickedFlags()
{
- return;
- myClickedPoint.clear();
+ //myClickedPoint.clear();
myCurrentPoint.clear();
}
void onMouseMoved(ModuleBase_IViewWindow*, QMouseEvent*);
void onMouseDoubleClick(ModuleBase_IViewWindow*, QMouseEvent*);
void onApplicationStarted();
- void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget);
+ //void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget);
void onBeforeContextMenu();
void onAfterContextMenu();
bool myIsMouseOverViewProcessed; /// the state whether the over view state is processed by mouseMove method
bool myIsPopupMenuActive; /// the state of the popup menu is shown
Point myCurrentPoint;
- Point myClickedPoint;
+ //Point myClickedPoint;
CompositeFeaturePtr myCurrentSketch;
/// Process value changed event
//void onValuesChanged();
+ /// Compute the feature default value and fill the controls with it
+ /// or store the control value to the feature
+ /// The widget is not initialize the attribute value in order to avoid the
+ /// incorrect visualization in Sketch. E.g. by a line creation, the line should not
+ /// be visualized immediatelly when the end point widget is activated.
+ virtual void initializeValueByActivate();
+
private:
/// Returns point 2d from selected vertex
/// \param theView a view window