Bug 238644 - 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
Summary: When closing an unactive tab, the URL in the URL bar, gets changed to the URL...
Status: RESOLVED FIXED
Alias: None
Product: rekonq
Classification: Applications
Component: general (show other bugs)
Version: latest git snapshot
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks: 237890
  Show dependency treegraph
 
Reported: 2010-05-24 03:40 UTC by Panagiotis Papadopoulos
Modified: 2010-09-04 10:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.