From 66e66b7c2881cfb182ec4bf0b18a959371748300 Mon Sep 17 00:00:00 2001 From: Pan Zhang Date: Mon, 11 May 2026 18:05:13 +0800 Subject: dolphintabpage: drop swapActiveView in RightView close path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The RightView case in setSplitViewEnabled(false) called swapActiveView() when the secondary (right) pane was active. After the swap, m_primaryViewContainer pointed to the right pane—the same object already stored in view—so the subsequent m_primaryViewContainer->setActive(true) activated the pane about to be removed, leaving the left pane orphaned as secondary. Since the left pane is always the surviving view and already the primary, no pointer swap is needed. Remove the conditional swap so that closing the right pane always leaves m_primaryViewContainer pointing at the left pane, regardless of which pane was active. BUG: 520002 --- src/dolphintabpage.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 7187162a4..337afe00e 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -161,9 +161,6 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled, Animated animated, const break; case Choice::RightView: view = m_secondaryViewContainer; - if (!m_primaryViewActive) { - swapActiveView(); - } break; default: Q_UNREACHABLE(); -- cgit v1.3.1