From 296c71ce5af838b9e3971c662ef17ca0dbf0fddb Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 15 Apr 2022 06:10:45 +0200 Subject: [PATCH] Massive UI revamping (v7): save/restore all geometries in device set presets --- sdrgui/device/deviceuiset.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sdrgui/device/deviceuiset.cpp b/sdrgui/device/deviceuiset.cpp index 7dd0e5ced..e04f387ed 100644 --- a/sdrgui/device/deviceuiset.cpp +++ b/sdrgui/device/deviceuiset.cpp @@ -186,7 +186,11 @@ void DeviceUISet::loadDeviceSetSettings( Workspace *currentWorkspace ) { + qDebug("DeviceUISet::loadDeviceSetSettings: preset: [%s, %s]", + qPrintable(preset->getGroup()), qPrintable(preset->getDescription())); m_spectrumGUI->deserialize(preset->getSpectrumConfig()); + m_mainSpectrumGUI->restoreGeometry(preset->getSpectrumGeometry()); + m_deviceGUI->restoreGeometry(preset->getDeviceGeometry()); m_deviceAPI->loadSamplingDeviceSettings(preset); if (!preset->getShowSpectrum()) { @@ -204,9 +208,12 @@ void DeviceUISet::loadDeviceSetSettings( void DeviceUISet::saveDeviceSetSettings(Preset* preset) const { + qDebug("DeviceUISet::saveDeviceSetSettings: preset: [%s, %s]", + qPrintable(preset->getGroup()), qPrintable(preset->getDescription())); preset->setSpectrumConfig(m_spectrumGUI->serialize()); preset->setSpectrumWorkspaceIndex(m_mainSpectrumGUI->getWorkspaceIndex()); preset->setSpectrumGeometry(m_mainSpectrumGUI->saveGeometry()); + preset->setDeviceGeometry(m_deviceGUI->saveGeometry()); preset->setShowSpectrum(m_spectrumGUI->isVisible()); preset->setSelectedDevice(Preset::SelectedDevice{ m_deviceAPI->getSamplingDeviceId(),