From fbbe3c6385eb258b1c27685cdbc805a4e66b2f87 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 4 Feb 2018 15:58:36 +0100 Subject: [PATCH] TabTreeModel: Ignore dropping child on its parent --- src/lib/tabwidget/tabtreemodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/tabwidget/tabtreemodel.cpp b/src/lib/tabwidget/tabtreemodel.cpp index b5e272494..3df9c7534 100644 --- a/src/lib/tabwidget/tabtreemodel.cpp +++ b/src/lib/tabwidget/tabtreemodel.cpp @@ -229,6 +229,9 @@ bool TabTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action, in if (!it || !parentItem) { return false; } + if (it->parent == parentItem) { + return false; + } if (!parentItem->tab) { tab->setParentTab(nullptr); if (row < 0) {