mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge remote-tracking branch 'origin/bstoeger-range'
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
commit
46365b3199
13 changed files with 175 additions and 167 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "templateedit.h"
|
||||
#include "templatelayout.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/range.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileDialog>
|
||||
|
@ -63,10 +64,10 @@ void PrintOptions::setupTemplates()
|
|||
currList.sort();
|
||||
int current_index = 0;
|
||||
ui.printTemplate->clear();
|
||||
Q_FOREACH(const QString& theme, currList) {
|
||||
for (auto [idx, theme]: enumerated_range(currList)) {
|
||||
// find the stored template in the list
|
||||
if (theme == storedTemplate || theme == lastImportExportTemplate)
|
||||
current_index = currList.indexOf(theme);
|
||||
current_index = idx;
|
||||
ui.printTemplate->addItem(theme.split('.')[0], theme);
|
||||
}
|
||||
ui.printTemplate->setCurrentIndex(current_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue