SignalBase: Default to dynamic conversion preset, not custom values
authorSoeren Apel <soeren@apelpie.net>
Wed, 2 Aug 2017 16:42:34 +0000 (18:42 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 3 Aug 2017 11:16:22 +0000 (13:16 +0200)
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.

pv/data/signalbase.cpp

index e267885d8d214356d6e19692decf19cf7f56d796..7859e9a814e3c758587f78b6b0916f9c4dd8c4fb 100644 (file)
@@ -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)