diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp index bd5239e..6185974 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp @@ -342,7 +342,7 @@ bool CompoundDriver::setVNA(const DeviceDriver::VNASettings &s, std::functionsetSG(devSettings); } - lastNonIdleSettings.type = lastNonIdleSettings.Types::SG; + lastNonIdleSettings.type = Types::SG; lastNonIdleSettings.sg = s; isIdle = false; @@ -514,13 +514,13 @@ bool CompoundDriver::setExtRef(QString option_in, QString option_out) } // restore last non idle state switch(lastNonIdleSettings.type) { - case lastNonIdleSettings.Types::VNA: + case Types::VNA: setVNA(lastNonIdleSettings.vna); break; - case lastNonIdleSettings.Types::SA: + case Types::SA: setSA(lastNonIdleSettings.sa); break; - case lastNonIdleSettings.Types::SG: + case Types::SG: setSG(lastNonIdleSettings.sg); break; } diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h index 2520d0f..09d4faf 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h @@ -207,11 +207,12 @@ private: std::vector devices; bool zerospan; bool isIdle; + enum class Types{VNA, SA, SG}; struct { VNASettings vna; SASettings sa; SGSettings sg; - enum class Types{VNA, SA, SG} type; + Types type; } lastNonIdleSettings; unsigned int VNApoints; unsigned int SApoints;