From dec170ed24679fd49f9fb54af91f61146838f852 Mon Sep 17 00:00:00 2001 From: Rodrigo Oliva Date: Fri, 21 Feb 2020 22:46:21 +0100 Subject: [PATCH] Don't select a new tab if the tab being closed is not the current tab. (#125) --- src/DockWidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 338a5fa..dc8efb5 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -173,6 +173,12 @@ void DockWidgetPrivate::updateParentDockArea() return; } + // we don't need to change the current tab if the + // current dock widget is not the one being closed + if (DockArea->currentDockWidget() != _this){ + return; + } + auto NextDockWidget = DockArea->nextOpenDockWidget(_this); if (NextDockWidget) {