diff --git a/sdrbase/gui/glscopegui.cpp b/sdrbase/gui/glscopegui.cpp index f98a28ee6..1d9fcfac4 100644 --- a/sdrbase/gui/glscopegui.cpp +++ b/sdrbase/gui/glscopegui.cpp @@ -183,7 +183,6 @@ bool GLScopeGUI::deserialize(const QByteArray& data) setTrigUI(m_triggerIndex); setTrigLevelDisplay(); applySettings(); - applyTriggerSettings(); return true; } else { resetToDefaults(); @@ -191,6 +190,19 @@ bool GLScopeGUI::deserialize(const QByteArray& data) } } +void GLScopeGUI::applyAllTriggerSettings() +{ + quint32 currentTriggerIndex = m_triggerIndex; + + for (int i = 0; i < ScopeVis::m_nbTriggers; i++) + { + m_triggerIndex = i; + applyTriggerSettings(); + } + + m_triggerIndex = currentTriggerIndex; +} + void GLScopeGUI::setTrigUI(uint index) { index %= ScopeVis::m_nbTriggers; @@ -479,6 +491,10 @@ void GLScopeGUI::on_scope_traceSizeChanged(int) setTrigPreDisplay(); setTrigDelayDisplay(); applySettings(); + + if (m_triggerPre > 0) { + applyAllTriggerSettings(); // change of trace size changes number of pre-trigger samples + } } void GLScopeGUI::on_scope_sampleRateChanged(int) diff --git a/sdrbase/gui/glscopegui.h b/sdrbase/gui/glscopegui.h index 6e21fc295..74c17b1e9 100644 --- a/sdrbase/gui/glscopegui.h +++ b/sdrbase/gui/glscopegui.h @@ -67,6 +67,7 @@ private: void applySettings(); void applyTriggerSettings(); + void applyAllTriggerSettings(); void setTimeScaleDisplay(); void setTraceLenDisplay(); void setTimeOfsDisplay();