summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/maintab.cpp4
-rw-r--r--desktop-widgets/simplewidgets.cpp8
2 files changed, 9 insertions, 3 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp
index 3c9518247..eddf90b98 100644
--- a/desktop-widgets/maintab.cpp
+++ b/desktop-widgets/maintab.cpp
@@ -1049,8 +1049,10 @@ void MainTab::acceptChanges()
// each dive that was selected might have had the temperatures in its active divecomputer changed
// so re-populate the temperatures - easiest way to do this is by calling fixup_dive
for_each_dive (i, d) {
- if (d->selected)
+ if (d->selected) {
fixup_dive(d);
+ invalidate_dive_cache(d);
+ }
}
}
if (editMode != TRIP && current_dive->divetrip) {
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index 6d46a49c7..6c9ec3f96 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -153,8 +153,10 @@ void RenumberDialog::buttonClicked(QAbstractButton *button)
int newNr = ui.spinBox->value();
struct dive *dive = NULL;
for_each_dive (i, dive) {
- if (!selectedOnly || dive->selected)
+ if (!selectedOnly || dive->selected) {
+ invalidate_dive_cache(dive);
renumberedDives.insert(dive->id, QPair<int,int>(dive->number, newNr++));
+ }
}
UndoRenumberDives *undoCommand = new UndoRenumberDives(renumberedDives);
MainWindow::instance()->undoStack->push(undoCommand);
@@ -189,8 +191,10 @@ void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second)
void SetpointDialog::buttonClicked(QAbstractButton *button)
{
- if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole && dc)
+ if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole && dc) {
add_event(dc, time, SAMPLE_EVENT_PO2, 0, (int)(1000.0 * ui.spinbox->value()), "SP change");
+ invalidate_dive_cache(current_dive);
+ }
mark_divelist_changed(true);
MainWindow::instance()->graphics()->replot();
}