subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 1641147e7b Undo: don't create spurious undo commands for temperature fields
When tabbing through the dive-info fields we get *EditingFinished
signals. This would create undo commands. The undo commands should
recognize if nothing changed. But for the temperature fields,
owing to rounding, an unchanged text could actually represent a
different value.

This would lead to very confusing situations:
1) Edit air temperature
2) Press tab to finish editing
3) Focus goes to water temperature
4) Try to undo change in menu
5) When opening the menu water temperature loses focus
6) Water temperature is edited
7) Undo undos the water temperature, not the air temperature
8) Goto 4

Fortunately, QLineEdit fields have the isModified() member function
that returns true if the field was changed by the user. Use
this to prevent this case. This is not a general method, i.e.
it has to applied to every field with that problem. But it is
less intrusive than subclassing the QLineEdit class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-15 11:07:15 -07:00
..
maintab.cpp Undo: don't create spurious undo commands for temperature fields 2019-06-15 11:07:15 -07:00
maintab.h Dive site: Add button to display all dive sites 2019-05-11 12:35:11 -07:00
maintab.ui Dive site: Add button to display all dive sites 2019-05-11 12:35:11 -07:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveEquipment.cpp Desktop: invalidate dive cache on equipment edit 2019-06-07 04:51:04 +03:00
TabDiveEquipment.h Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveEquipment.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveExtraInfo.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp Cleanup: small coding style fixes 2019-05-15 07:42:14 -07:00
TabDiveInformation.h Convert the atmospheric pressure in the Information Tab to an editable field 2019-05-15 07:37:14 -07:00
TabDiveInformation.ui Convert the atmospheric pressure in the Information Tab to an editable field 2019-05-15 07:37:14 -07:00
TabDivePhotos.cpp Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Filter: add reference counting for dive-site mode 2019-05-11 12:06:19 -07:00
TabDiveSite.h Filter: add reference counting for dive-site mode 2019-05-11 12:06:19 -07:00
TabDiveSite.ui Dive sites: add fulltext filter 2019-04-12 18:19:07 +03:00
TabDiveStatistics.cpp optimize selectedDivesGasUsed() 2019-04-12 12:59:17 +03:00
TabDiveStatistics.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00