mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: remove weightsystems_equal function
This was used to test whether the "really discard changes?" message should be shown. However, we now edit weightsystems directly with undo commands. Therefore, the check is unnecessary and the whole function can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0306109e95
commit
e3950df864
2 changed files with 2 additions and 5 deletions
|
@ -210,9 +210,8 @@ static QVector<dive *> getSelectedDivesCurrentLast()
|
|||
return res;
|
||||
}
|
||||
|
||||
// TODO: This are only temporary functions until undo of weightsystems and cylinders is implemented.
|
||||
// TODO: This is a temporary functions until undo of cylinders is implemented.
|
||||
// Therefore it is not worth putting it in a header.
|
||||
extern bool weightsystems_equal(const dive *d1, const dive *d2);
|
||||
extern bool cylinders_equal(const dive *d1, const dive *d2);
|
||||
|
||||
void TabDiveEquipment::acceptChanges()
|
||||
|
|
|
@ -589,9 +589,7 @@ void MainTab::rejectChanges()
|
|||
{
|
||||
EditMode lastMode = editMode;
|
||||
|
||||
if (lastMode != NONE && current_dive &&
|
||||
(!cylinders_equal(current_dive, &displayed_dive) ||
|
||||
!weightsystems_equal(current_dive, &displayed_dive))) {
|
||||
if (lastMode != NONE && current_dive && !cylinders_equal(current_dive, &displayed_dive)) {
|
||||
if (QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(tr("Discard the changes?"),
|
||||
tr("You are about to discard your changes.")),
|
||||
QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard) != QMessageBox::Discard) {
|
||||
|
|
Loading…
Add table
Reference in a new issue