summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxflowview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx/qfxflowview.cpp')
-rw-r--r--src/declarative/fx/qfxflowview.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxflowview.cpp b/src/declarative/fx/qfxflowview.cpp
index 911fc3d..e45f939 100644
--- a/src/declarative/fx/qfxflowview.cpp
+++ b/src/declarative/fx/qfxflowview.cpp
@@ -286,8 +286,11 @@ void QFxFlowView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
clearTimeLine();
- m_items.removeAll(m_dragItem);
- m_items.insert(m_dragIdx, m_dragItem);
+ if (m_dragIdx != -1) {
+ m_items.removeAll(m_dragItem);
+ m_items.insert(m_dragIdx, m_dragItem);
+ }
+
reflow(true);
m_dragItem = 0;
m_dragIdx = -1;