Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54923 - /branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Thu, 22 Jan 2009 18:21:08 -0000
  • Message-id: <E1LQ4Au-0005V2-LO@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Thu Jan 22 19:21:08 2009
New Revision: 54923

URL: http://svn.opensuse.org/viewcvs/yast?rev=54923&view=rev
Log:
fixed index corruption when tabs are removed

Modified:
branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc

Modified: branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc?rev=54923&r1=54922&r2=54923&view=diff
==============================================================================
--- branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc (original)
+++ branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc Thu Jan 22
19:21:08 2009
@@ -351,6 +351,22 @@
currentPage->tabIndex = -1;

tabBar()->removeTab( currentIndex );
+
+ //
+ // Adjust tab index of the active pages to the right of that page
+ //
+
+ for ( YQPkgFilterPageVector::iterator it = priv->pages.begin();
+ it != priv->pages.end();
+ ++it )
+ {
+ YQPkgFilterPage * page = *it;
+
+ if ( page->tabIndex >= currentIndex )
+ page->tabIndex--;
+ }
+
+ showPage( tabBar()->currentIndex() );
}
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages