PartSet_SketcherMgr::PartSet_SketcherMgr(PartSet_Module* theModule)
: QObject(theModule), myModule(theModule), myIsDragging(false), myDragDone(false),
myIsPropertyPanelValueChanged(false), myIsMouseOverWindow(false),
- myIsMouseOverViewProcessed(true), myPreviousUpdateViewerEnabled(true)
+ myIsMouseOverViewProcessed(true), myPreviousUpdateViewerEnabled(true),
+ myIsPopupMenuActive(false)
{
ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
ModuleBase_IViewer* aViewer = anIWorkshop->viewer();
{
get2dPoint(theWnd, theEvent, myClickedPoint);
+ myIsPopupMenuActive = theEvent->buttons() & Qt::RightButton;
+
if (!(theEvent->buttons() & Qt::LeftButton))
return;
void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
{
+ if (myIsPopupMenuActive)
+ myIsPopupMenuActive = false;
+
ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
ModuleBase_IViewer* aViewer = aWorkshop->viewer();
if (!aViewer->canDragByMouse())
return aCanDisplay;
}
}
+ if (myIsPopupMenuActive)
+ return aCanDisplay;
// during a nested create operation, the feature is redisplayed only if the mouse over view
// of there was a value modified in the property panel after the mouse left the view
std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
if (aSketchFeature.get() != NULL) {
- std::string anAttribute = SketchPlugin_Feature::CONSTRUCTION_ID();
+ std::string anAttribute = SketchPlugin_SketchEntity::CONSTRUCTION_ID();
std::shared_ptr<ModelAPI_AttributeBoolean> aConstructionAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(aSketchFeature->data()->attribute(anAttribute));
std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
if (aSketchFeature.get() != NULL) {
- std::string anAttribute = SketchPlugin_Feature::CONSTRUCTION_ID();
+ std::string anAttribute = SketchPlugin_SketchEntity::CONSTRUCTION_ID();
std::shared_ptr<ModelAPI_AttributeBoolean> aConstructionAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(aSketchFeature->data()->attribute(anAttribute));