From 19863922558987136c320a08f46e3c3239094b7c Mon Sep 17 00:00:00 2001 From: Nick D'Ademo Date: Sat, 3 Nov 2018 20:11:53 +0800 Subject: QMdiArea: Do not move active subwindow after tile rearrange Currently, a tile rearrange will move the active subwindow (if any) to position zero (top-left). This ignores any tiling order set via setActivationOrder(). This change removes this move so that the set tiling order is respected when a tile operation is performed. Fixes: QTBUG-43356 Change-Id: I2c481f0ffe45e42e811c6b6d476eb4cb65aa5d1f Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qmdiarea.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index cdc1291511..104cbdbcda 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -954,14 +954,6 @@ void QMdiAreaPrivate::rearrange(Rearranger *rearranger) } } - if (active && rearranger->type() == Rearranger::RegularTiler && !tileCalledFromResizeEvent) { - // Move active window in front if necessary. That's the case if we - // have any windows with staysOnTopHint set. - int indexToActive = widgets.indexOf((QWidget *)active); - if (indexToActive > 0) - widgets.move(indexToActive, 0); - } - QRect domain = viewport->rect(); if (rearranger->type() == Rearranger::RegularTiler && !widgets.isEmpty()) domain = resizeToMinimumTileSize(minSubWindowSize, widgets.count()); -- cgit v1.2.3