mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-30 15:50:52 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user