From 14cdfee2814f7850049ae23a763e73f59b69adcf Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Mon, 15 Feb 2021 11:54:37 +0100 Subject: [PATCH] fixed refresh of channel trigger page when back from ramp&delay page --- src/eez/modules/psu/gui/page_ch_settings.cpp | 6 ++++++ src/eez/modules/psu/gui/page_ch_settings.h | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/eez/modules/psu/gui/page_ch_settings.cpp b/src/eez/modules/psu/gui/page_ch_settings.cpp index 4f365875c..35c2d9449 100644 --- a/src/eez/modules/psu/gui/page_ch_settings.cpp +++ b/src/eez/modules/psu/gui/page_ch_settings.cpp @@ -510,6 +510,12 @@ void ChSettingsTriggerPage::pageAlloc() { outputDelayDuration = outputDelayDurationOrig = g_channel->outputDelayDuration; } +void ChSettingsTriggerPage::pageWillAppear() { + if (!getDirty()) { + pageAlloc(); + } +} + int ChSettingsTriggerPage::getDirty() { return triggerMode != triggerModeOrig || diff --git a/src/eez/modules/psu/gui/page_ch_settings.h b/src/eez/modules/psu/gui/page_ch_settings.h index 24eba571a..75136aabe 100644 --- a/src/eez/modules/psu/gui/page_ch_settings.h +++ b/src/eez/modules/psu/gui/page_ch_settings.h @@ -158,10 +158,11 @@ class ChSettingsOtpProtectionPage : public ChSettingsProtectionSetPage { class ChSettingsTriggerPage : public SetPage { public: - void pageAlloc(); + void pageAlloc() override; + void pageWillAppear() override; - int getDirty(); - void set(); + int getDirty() override; + void set() override; TriggerMode triggerMode;