Skip to content

Commit 1a4c081

Browse files
committed
TriggerPropertiesDialog: fixed bug where typing a new position into the properties dialog did not actually update the trigger position in hardware
1 parent fb31e8f commit 1a4c081

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

release-notes/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This is a running list of significant bug fixes and new features since the last
1414
* Incorrect loading of CSV files with Windows line endings (https://github.com/ngscopeclient/scopehal/issues/1002)
1515
* Incorrect buffer size calculation in DeEmbedFilter unit test causing intermittent crashes of the test case in CI (no github ticket)
1616
* ThunderScope: trigger position would occasionally be corrupted and get stuck at -9223 seconds (no github ticket)
17+
* Typing a new trigger position into the text box in the trigger properties dialog does not actually change the trigger position in hardware (no github ticket)
1718

1819
## Other changes since v0.1
1920

src/ngscopeclient/TriggerPropertiesDialog.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,23 @@ void TriggerPropertiesPage::Render(bool graphEditorMode)
102102
{
103103
if(StartSection("Position", graphEditorMode))
104104
{
105-
//Check if trigger offset changed outside the dialog
106-
Unit fs(Unit::UNIT_FS);
107-
float off = m_scope->GetTriggerOffset();
108-
if(m_committedTriggerOffset != off)
109-
{
110-
m_committedTriggerOffset = off;
111-
m_triggerOffset = fs.PrettyPrint(off);
112-
}
113-
114105
//Actual trigger position
106+
Unit fs(Unit::UNIT_FS);
115107
if(Dialog::UnitInputWithImplicitApply(
116108
"Delay",
117109
m_triggerOffset,
118110
m_committedTriggerOffset,
119111
fs))
120112
{
121-
m_scope->SetTriggerOffset(off);
113+
m_scope->SetTriggerOffset(m_committedTriggerOffset);
114+
}
115+
116+
//Check if trigger offset changed outside the dialog
117+
float off = m_scope->GetTriggerOffset();
118+
if(m_committedTriggerOffset != off)
119+
{
120+
m_committedTriggerOffset = off;
121+
m_triggerOffset = fs.PrettyPrint(off);
122122
}
123123

124124
Dialog::HelpMarker(

0 commit comments

Comments
 (0)