From: Soeren Apel Date: Wed, 2 Aug 2017 16:42:34 +0000 (+0200) Subject: SignalBase: Default to dynamic conversion preset, not custom values X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=753c8f08d8aefec455577b980d105500cd6addd8 SignalBase: Default to dynamic conversion preset, not custom values The reason for this change is that when you initially select a conversion from the channel config popup dialog, the threshold will be set to "0.0V" or "0.0V/0.0V", respectively. This is of course not what we want and the root cause is that when no preset is selected, NoPreset is assumed instead of DynamicPreset. This patch changes this. --- diff --git a/pv/data/signalbase.cpp b/pv/data/signalbase.cpp index e267885d..7859e9a8 100644 --- a/pv/data/signalbase.cpp +++ b/pv/data/signalbase.cpp @@ -344,7 +344,7 @@ SignalBase::ConversionPreset SignalBase::get_current_conversion_preset() const if (preset != conversion_options_.end()) return (ConversionPreset)((preset->second).toInt()); - return NoPreset; + return DynamicPreset; } void SignalBase::set_conversion_preset(ConversionPreset id)