BUGFIX: assign visualparent if it's set
not the other way around
This commit is contained in:
parent
d4b7cccfc7
commit
4e8d9963ab
@ -97,9 +97,9 @@ void QMenuProxy::open()
|
|||||||
|
|
||||||
QGraphicsObject *parentItem;
|
QGraphicsObject *parentItem;
|
||||||
if (m_visualParent) {
|
if (m_visualParent) {
|
||||||
parentItem = qobject_cast<QGraphicsObject *>(parent());
|
|
||||||
} else {
|
|
||||||
parentItem = m_visualParent.data();
|
parentItem = m_visualParent.data();
|
||||||
|
} else {
|
||||||
|
parentItem = qobject_cast<QGraphicsObject *>(parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parentItem || !parentItem->scene()) {
|
if (!parentItem || !parentItem->scene()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user