Bug 238644

Summary: When closing an unactive tab, the URL in the URL bar, gets changed to the URL of the tab, next to the just closed one
Product: [Unmaintained] rekonq Reporter: Panagiotis Papadopoulos <pano_90>
Component: generalAssignee: Andrea Diamantini <adjam7>
Status: RESOLVED FIXED    
Severity: normal CC: nsm.nikhil
Priority: NOR    
Version: latest git snapshot   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 237890    

Description Panagiotis Papadopoulos 2010-05-24 03:40:32 UTC
Version:           latest git snapshot (0.4.xx)
OS:                Linux

When closing an unactive tab, the URL in the URL bar, gets changed to the URL of thetab, next to the just closed one.

Reproducible: Didn't try

Steps to Reproduce:
• Start rekonq
• Load 3 differents websites in 3 tabs. (e.g. Tab 1: kde.org, Tab 2: gnome.org, Tab 3: xfce.org)
• Activate the third tab (xfce.org).
• Now close the first tab (kde.org), by clicking on the little X button

Actual Results:  
rekonq will change the URL bar's URL from xfce.org (the URL of the currently active tab) to gnome.org, the tab next to the one, that got closed.
Comment 1 Nikhil Marathe 2010-05-24 17:20:51 UTC
commit f8bc9310e0a22e75e9905b78a3d84fc28be5f2c2
Author: Nikhil Marathe <nsm.nikhil@gmail.com>
Date:   Mon May 24 17:12:54 2010 +0530

    Restore stacked url bars to the right index when a tab is closed
    
    BUG: 238644

diff --git a/src/mainview.cpp b/src/mainview.cpp
index 1c36adc..932af00 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -512,6 +512,8 @@ void MainView::closeTab(int index, bool del)
     UrlBar *urlbar = _widgetBar->urlBar(index);
     _widgetBar->removeWidget(urlbar);
 
+    _widgetBar->setCurrentIndex(m_currentTabIndex);
+
     if (del)
     {
         tab->deleteLater();    // tab is scheduled for deletion.