[qet] [1486] Fixed a minor bug in the template editor > save as dialog.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1486
Author:   xavier
Date:     2012-02-05 19:56:02 +0100 (Sun, 05 Feb 2012)
Log Message:
-----------
Fixed a minor bug in the template editor > save as dialog.

Modified Paths:
--------------
    branches/0.3/sources/titleblock/templatelocationsaver.cpp

Modified: branches/0.3/sources/titleblock/templatelocationsaver.cpp
===================================================================
--- branches/0.3/sources/titleblock/templatelocationsaver.cpp	2012-02-03 21:36:19 UTC (rev 1485)
+++ branches/0.3/sources/titleblock/templatelocationsaver.cpp	2012-02-05 18:56:02 UTC (rev 1486)
@@ -37,7 +37,7 @@
 	@param location to be displayed by this widget
 */
 void TitleBlockTemplateLocationSaver::setLocation(const TitleBlockTemplateLocation &location) {
-	// hack: if o suitable index was found, set it to 1, which is supposed to be the user collection
+	// hack: if no suitable index was found, set it to 1, which is supposed to be the user collection
 	int index = indexForCollection(location.parentCollection());
 	if (index == -1 && collections_ -> count() > 1) index = 1;
 	collections_ -> setCurrentIndex(index);
@@ -46,10 +46,10 @@
 		int template_index = templates_ -> findText(location.name());
 		if (template_index != -1) {
 			templates_ -> setCurrentIndex(template_index);
-		} else {
-			templates_ -> setCurrentIndex(0);
+			return;
 		}
 	}
+	templates_ -> setCurrentIndex(0);
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/