Version: (using Devel) OS: Linux Installed from: Compiled sources 1. Start Konqueror and load a website 2. On the loaded website, open two links as tabs 3. switch the view to the last tab (in other words click on the last tab) 4. Close the just activated tab (the view jumps back to the first tab) 5. The "highlighting" of the second tab is "gone" :-) I have ticked all checkboxes in the "Tabbed Browsing Settings" (the first page that appears when opening konquerors Settings), except "Open new tab after current tab" I know it's nothing big, but I thought it would be good mentioning it ;-) thanks
Update: In KDE trunk it is still present
When I tries to do those 5 steps it jumps to the 2. tabs when closing the 3 tabs. It does not jump back to tab 1. And it is konq 4.2.4 on debian sid
Did you enable (at least) the last checkbox in Konquerors settings? "Activate previously used tab when closing the current tab"
Nope I was using default settings. When I change "Activate previously used tab when closing the current tab" it behave like descriped.
This bug is also present in Konversation, so this probably is some kind of "general" KDE bug. Can someone please assign it to the correct "product"? Thanks!
A little "Howto reproduce this bug" for Konversation: 1. Open at least 3 channels 2. Activate the firt tab (by clicking on it), and then switch to the third one (by clicking on it :-P) 3. Now wait until there is some activity in tab 2, so that the tab gets "highlighted" 4. Now close the third tab Something I noticed: When closing tabs in Konqueror you can see (in the windowtitle for example), that konqueror is switching the view for a very short time to the left tab next to it, before jumping to the last activated tab. This might explain why the highlighting gets removed from the tabs...
Here using: Qt: 4.5.2 (KDE-Qt git commit 46a247a2c9a8c0c4456a02f6a0922d859d88fe76 Date: Fri Jun 26 13:45:37 2009 +0200) KDE: 4.3.60 (KDE 4.3.60 (KDE 4.4 >= 20090624)) kdelibs svn rev. 987857 / kdebase svn rev. 987857 on ArchLinux i686 - Kernel 2.6.30 If I open more than two links from the first page, then click the last tab (at the right) and close it, only the one next to it loses the "unread highlight". The other ones between the first and the last-1 keep it. I should look on the ktabbar code and check if this "activate previously opened" option is a global one or if it is implemented at Konqueror (and Konversation borrowed the same code). It looks like this options is only faking the "active previously opened", so it first shows the tab on the left, and then quickly switches to the last active one. That would explain why the tab "closed-1" lost its highlight
Indeed, KTabBar handles the code for "activate previously opened tab on close", so it is a kdelibs/kdeui issue. Reassigning
Created attachment 34871 [details] Proposed patch The current code, first removes the current tab and the sets the index to the previous active one. This causes this bug as removing the current tab will force the index-1 tab to be activated too, and then the previously activated one will be set. Proposed patch: first set the current index to the "previously active tab", and then remove the "current" (or the index of the tab which was the current one when we middleclicked it)
@Urs: could you check the patch? Thanks
The patch looks okay to me; probably you want to add a testcase to the KTabWidget test app? Just an idea if you like...
It seems the new Qt api superseeds this: "Use QTabBar::setSelectionBehaviorOnRemove() instead.". (QTabBar::SelectPreviousTab) Should KTabBar ported to use this feature ?
Dario: I think we should use as much as possible from QTabBar. I have not looked into that new feature yet, but if you think we can replace it with this new feature, please prepare a patch.
any update? :-)
I didn't had the time to look into this yet.. sorry
Patch proposed at http://reviewboard.kde.org/r/1823/ . Regards
SVN commit 1048848 by darioandres: - Update KTabBar and KTabWidget to use the Qt "setSelectionBehaviorOnRemove" implementation - Implements http://reviewboard.kde.org/r/1823/ BUG: 181124 BUG: 207747 M +2 -4 ktabbar.cpp M +3 -21 ktabwidget.cpp M +4 -1 ktabwidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1048848