mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: on first addition of dive site, edit name
When adding a dive site, enter the name field of the new dive site. Thus, when adding a new dive site, the user can immediately edit the name. The code is rather subtle: It hooks into the dive site added signal before executing the command and unhooks afterwards. This only works, because signals are executed in order of connect - thus the model adds the index first and only *then* is the field edited. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
56dcbd9588
commit
aac8eacfa2
2 changed files with 21 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ public:
|
|||
void clear() override;
|
||||
private slots:
|
||||
void add();
|
||||
void diveSiteAdded(struct dive_site *, int idx);
|
||||
private:
|
||||
Ui::TabDiveSite ui;
|
||||
DiveSiteSortedModel model;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue