Skip to content

Commit

Permalink
fixed refresh of channel trigger page when back from ramp&delay page
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Feb 15, 2021
1 parent b88c346 commit 14cdfee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/eez/modules/psu/gui/page_ch_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,12 @@ void ChSettingsTriggerPage::pageAlloc() {
outputDelayDuration = outputDelayDurationOrig = g_channel->outputDelayDuration;
}

void ChSettingsTriggerPage::pageWillAppear() {
if (!getDirty()) {
pageAlloc();
}
}

int ChSettingsTriggerPage::getDirty() {
return
triggerMode != triggerModeOrig ||
Expand Down
7 changes: 4 additions & 3 deletions src/eez/modules/psu/gui/page_ch_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 14cdfee

Please sign in to comment.