if (!(theEvent->buttons() & Qt::LeftButton))
return;
- if (myModule->sketchReentranceMgr()->processMousePressed())
+ if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent))
return;
// Clear dragging mode
void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
{
- if (myModule->sketchReentranceMgr()->processMouseReleased())
+ if (myModule->sketchReentranceMgr()->processMouseReleased(theWnd, theEvent))
return;
ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
{
- if (myModule->sketchReentranceMgr()->processMouseMoved())
+ if (myModule->sketchReentranceMgr()->processMouseMoved(theWnd, theEvent))
return;
if (isNestedCreateOperation(getCurrentOperation()) && !myIsMouseOverViewProcessed) {
breakOperationSequence();
}
-bool PartSet_SketcherReetntrantMgr::processMouseMoved()
+bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow*/* theWnd*/,
+ QMouseEvent*/* theEvent*/)
{
bool aProcessed = false;
if (!isActiveMgr())
return aProcessed;
}
-bool PartSet_SketcherReetntrantMgr::processMousePressed()
+bool PartSet_SketcherReetntrantMgr::processMousePressed(ModuleBase_IViewWindow*/* theWnd*/,
+ QMouseEvent*/* theEvent*/)
{
return isActiveMgr() && myIsInternalEditOperation;
}
-bool PartSet_SketcherReetntrantMgr::processMouseReleased()
+bool PartSet_SketcherReetntrantMgr::processMouseReleased(ModuleBase_IViewWindow* theWnd,
+ QMouseEvent* theEvent)
{
bool aProcessed = false;
if (!isActiveMgr())
//if (operationMgr()->isApplyEnabled())
anOperation->commit();
aProcessed = true;
+
+ // fill the widget by the mouse event point
+ PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
+ if (aPoint2DWdg) {
+ aPoint2DWdg->onMouseRelease(theWnd, theEvent);
+ }
}
+
return aProcessed;
}
class ModuleBase_IWorkshop;
class ModuleBase_Operation;
class ModuleBase_ModelWidget;
+class ModuleBase_IViewWindow;
+
+class QMouseEvent;
class XGUI_Workshop;
class PartSet_Module;
/// It happens if the current operation is an internal edit operation and the first
/// control can be filled by the mouse move event. The operation is committed.
/// \return true if operation is committed.
- bool processMouseMoved();
+ bool processMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
/// Return true if the manager processes the mouse press event
/// \return true if the current operation is an internal edit operation.
- bool processMousePressed();
+ bool processMousePressed(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
/// Return true if the manager processes the mouse enter event
/// It happens if the current operation is an internal edit operation.
/// The operation is committed.
/// \return true if operation is committed.
- bool processMouseReleased();
+ bool processMouseReleased(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
/// Activates the operation widgets relatively the internal reentrant flags
void propertyPanelDefined(ModuleBase_Operation* theOperation);
/// \param theEvent a mouse event
void onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
-protected slots:
/// Process mouse release event
/// \param theWnd a view window
/// \param theEvent a mouse event