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
This commit is contained in:
xavier
2012-02-05 18:56:02 +00:00
parent ef07a3b7f0
commit 0e63192a3d

View File

@@ -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);
}
/**