TechDraw: transfert mousePressEvent from QGIPrimPath to parent
This commit is contained in:
@@ -227,3 +227,13 @@ Base::Reference<ParameterGrp> QGIPrimPath::getParmGroup()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
return hGrp;
|
||||
}
|
||||
|
||||
void QGIPrimPath::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
QGIView *parent;
|
||||
QGraphicsItem* qparent = parentItem();
|
||||
if (qparent != nullptr) {
|
||||
parent = dynamic_cast<QGIView *> (qparent);
|
||||
parent->mousePressEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ protected:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
|
||||
@@ -100,6 +100,8 @@ public:
|
||||
|
||||
static Gui::ViewProvider* getViewProvider(App::DocumentObject* obj);
|
||||
MDIViewPage* getMDIViewPage(void) const;
|
||||
// Mouse handling
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
protected:
|
||||
QGIView* getQGIVByName(std::string name);
|
||||
@@ -107,7 +109,6 @@ protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
// Mouse handling
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
// Preselection events:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user