← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2337: fix the toolbar size menu (wrong offsets cause of the sub-menu auto title)

 

------------------------------------------------------------
revno: 2337
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-12-09 00:01:06 +0100
message:
  fix the toolbar size menu (wrong offsets cause of the sub-menu auto title)
modified:
  win32/MainWindow.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2010-12-03 11:29:33 +0000
+++ win32/MainWindow.cpp	2010-12-08 23:01:06 +0000
@@ -1239,9 +1239,9 @@
 		const int& setting = SETTING(TOOLBAR_SIZE);
 		for(size_t i = 0, iend = sizeof(sizes) / sizeof(int); i < iend; ++i) {
 			const int& n = sizes[i];
-			size->appendItem(Text::toT(Util::toString(n)), std::bind(&MainWindow::handleToolbarSize, this, n));
+			unsigned pos = size->appendItem(Text::toT(Util::toString(n)), std::bind(&MainWindow::handleToolbarSize, this, n));
 			if(n == setting)
-				size->checkItem(i);
+				size->checkItem(pos);
 		}
 	}