diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/ui_utils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 55f8f3d1fa..9559a7fabd 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -1467,9 +1467,12 @@ LRESULT CCtrlTreeView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) // Proceed moving
HTREEITEM insertAfter = hti.hItem;
+ HTREEITEM hParent = GetParent(hti.hItem);
for (int i = 0; i < arItems.getCount(); i++) {
if (!insertAfter)
break;
+ if (GetParent(arItems[i]) != hParent) // prevent subitems from being inserted at the same level
+ continue;
insertAfter = MoveItemAbove(arItems[i], insertAfter);
if (!i)
|