fixed config dialog crashing

Mon, 15 Jul 2013 22:27:16 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 15 Jul 2013 22:27:16 +0300
changeset 386
751d31336f08
parent 385
b136331072a0
child 387
248296088f2c

fixed config dialog crashing

src/configDialog.cpp file | annotate | diff | comparison | revisions
--- a/src/configDialog.cpp	Mon Jul 15 22:25:00 2013 +0300
+++ b/src/configDialog.cpp	Mon Jul 15 22:27:16 2013 +0300
@@ -123,10 +123,10 @@
 
 void ConfigDialog::addShortcut (keyseqconfig& cfg, QAction* act, ulong& i) {
 	ShortcutListItem* item = new ShortcutListItem;
-	setShortcutText (item);
 	item->setIcon (act->icon());
 	item->setKeyConfig (&cfg);
 	item->setAction (act);
+	setShortcutText (item);
 	
 	// If the action doesn't have a valid icon, use an empty one
 	// so that the list is kept aligned.
@@ -561,8 +561,7 @@
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
-void ConfigDialog::setShortcutText( ShortcutListItem* item )
-{
+void ConfigDialog::setShortcutText( ShortcutListItem* item ) {
 	QAction* act = item->action();
 	str label = act->iconText();
 	str keybind = item->keyConfig()->value.toString();

mercurial