summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 7f02fb9..7781258 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -1887,8 +1887,10 @@ void QGraphicsWidget::insertAction(QAction *before, QAction *action)
}
d->actions.insert(pos, action);
- QActionPrivate *apriv = action->d_func();
- apriv->graphicsWidgets.append(this);
+ if (index == -1) {
+ QActionPrivate *apriv = action->d_func();
+ apriv->graphicsWidgets.append(this);
+ }
QActionEvent e(QEvent::ActionAdded, action, before);
QApplication::sendEvent(this, &e);