From 0e63192a3daa71a987433fbe622d63897fa1933a Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 5 Feb 2012 18:56:02 +0000 Subject: [PATCH] Fixed a minor bug in the template editor > save as dialog. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1486 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/titleblock/templatelocationsaver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/titleblock/templatelocationsaver.cpp b/sources/titleblock/templatelocationsaver.cpp index 79d8aee41..d580a170a 100644 --- a/sources/titleblock/templatelocationsaver.cpp +++ b/sources/titleblock/templatelocationsaver.cpp @@ -37,7 +37,7 @@ QString TitleBlockTemplateLocationSaver::name() const { @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 @@ void TitleBlockTemplateLocationSaver::setLocation(const TitleBlockTemplateLocati int template_index = templates_ -> findText(location.name()); if (template_index != -1) { templates_ -> setCurrentIndex(template_index); - } else { - templates_ -> setCurrentIndex(0); + return; } } + templates_ -> setCurrentIndex(0); } /**