desktop: don't update notes field when executing command

User report: when switching focus between windows, the
cursor position gets lost. This is due to a note-edit
command being fired, which then overwrites the notes tab.

To prevent this, don't update the notes field when placing
a command. Moreover, generally don't update the dive
selection when placing a command as that also rewrites all
the values.

Should this be extended to other fields?

Fixes #3365

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-02-14 21:59:49 +01:00 committed by Dirk Hohndel
parent 1b8f3a06ec
commit 889827aadb
4 changed files with 6 additions and 7 deletions

View file

@ -156,7 +156,8 @@ void EditBase<T>::undo()
// Send signals.
DiveField id = fieldId();
emit diveListNotifier.divesChanged(stdToQt<dive *>(dives), id);
setSelection(selectedDives, current);
if (!placingCommand())
setSelection(selectedDives, current);
}
// We have to manually instantiate the constructors of the EditBase class,