From 2973eff337d8743d47cd2dc02167c51281e8c92a Mon Sep 17 00:00:00 2001 From: srcejon Date: Wed, 10 Apr 2024 01:40:57 +0100 Subject: [PATCH] Preset: Copy and initialise all fields for #2061. --- sdrbase/settings/preset.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sdrbase/settings/preset.cpp b/sdrbase/settings/preset.cpp index ff57b4904..fce681fc7 100644 --- a/sdrbase/settings/preset.cpp +++ b/sdrbase/settings/preset.cpp @@ -31,10 +31,16 @@ Preset::Preset() } Preset::Preset(const Preset& other) : + m_presetType(other.m_presetType), m_group(other.m_group), m_description(other.m_description), m_centerFrequency(other.m_centerFrequency), m_spectrumConfig(other.m_spectrumConfig), + m_spectrumGeometry(other.m_spectrumGeometry), + m_spectrumWorkspaceIndex(other.m_spectrumWorkspaceIndex), + m_deviceGeometry(other.m_deviceGeometry), + m_deviceWorkspaceIndex(other.m_deviceWorkspaceIndex), + m_selectedDevice(other.m_selectedDevice), m_dcOffsetCorrection(other.m_dcOffsetCorrection), m_iqImbalanceCorrection(other.m_iqImbalanceCorrection), m_channelConfigs(other.m_channelConfigs), @@ -50,6 +56,14 @@ void Preset::resetToDefaults() m_description = "no name"; m_centerFrequency = 0; m_spectrumConfig.clear(); + m_spectrumGeometry.clear(); + m_spectrumWorkspaceIndex = 0; + m_selectedDevice.m_deviceId = ""; + m_selectedDevice.m_deviceSerial = ""; + m_selectedDevice.m_deviceSequence = 0; + m_selectedDevice.m_deviceItemIndex = 0; + m_deviceGeometry.clear(); + m_deviceWorkspaceIndex = 0; m_layout.clear(); m_channelConfigs.clear(); m_dcOffsetCorrection = false;