diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-09-06 23:53:31 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-09-29 16:13:03 -0700 |
commit | d064f786088ff2aeb44a5b82b3d9743d0d978fc0 (patch) | |
tree | 3d25397db4fe68383c2acce2bced057b739c0264 /desktop-widgets/simplewidgets.cpp | |
parent | 8f898477cbaf3a1c8972ef4ad67321e27d543f5c (diff) | |
download | subsurface-d064f786088ff2aeb44a5b82b3d9743d0d978fc0.tar.gz |
filter: when a filter preset is selected, suggest its name on save
The goal here is to let the user edit already existing sets and
save them using their old name. This is a stop-gap measure until
we get a proper filter-set editing interface.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index bbce159b6..6eaab2eef 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -480,9 +480,10 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button) } } -AddFilterPresetDialog::AddFilterPresetDialog(QWidget *parent) +AddFilterPresetDialog::AddFilterPresetDialog(const QString &defaultName, QWidget *parent) { ui.setupUi(this); + ui.name->setText(defaultName); connect(ui.name, &QLineEdit::textChanged, this, &AddFilterPresetDialog::nameChanged); connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &AddFilterPresetDialog::accept); connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &AddFilterPresetDialog::reject); |