diff --git a/src/blackgui/components/simulatorselector.cpp b/src/blackgui/components/simulatorselector.cpp index e2ba7bbbe..fe4d844ef 100644 --- a/src/blackgui/components/simulatorselector.cpp +++ b/src/blackgui/components/simulatorselector.cpp @@ -213,7 +213,21 @@ namespace BlackGui void CSimulatorSelector::changedLastSelection() { - // forece decoupled update + // force decoupled update + QTimer::singleShot(100, this, &CSimulatorSelector::setToLastSelection); + } + + void CSimulatorSelector::changedLastSelectionRb() + { + // force decoupled update + if (m_mode != RadioButtons) { return; } + QTimer::singleShot(100, this, &CSimulatorSelector::setToLastSelection); + } + + void CSimulatorSelector::changedLastSelectionCb() + { + // force decoupled update + if (m_mode != CheckBoxes) { return; } QTimer::singleShot(100, this, &CSimulatorSelector::setToLastSelection); } } // ns diff --git a/src/blackgui/components/simulatorselector.h b/src/blackgui/components/simulatorselector.h index 19f1ba9f7..642698299 100644 --- a/src/blackgui/components/simulatorselector.h +++ b/src/blackgui/components/simulatorselector.h @@ -81,6 +81,9 @@ namespace BlackGui //! Remember selection void setRememberSelection(bool remember) { m_rememberSelection = remember; } + //! Is rembering selection? + bool isRememberingSelection() const { return m_rememberSelection; } + //! Clear values void clear(); @@ -101,12 +104,18 @@ namespace BlackGui //! Last selection has been changed void changedLastSelection(); + //! Last selection has been changed + void changedLastSelectionRb(); + + //! Last selection has been changed + void changedLastSelectionCb(); + QScopedPointer ui; Mode m_mode = CheckBoxes; bool m_noSelectionMeansAll = false; //!< for filters, no selection means all bool m_rememberSelection = false; //!< remember last selection - BlackMisc::CData m_currentSimulator { this, &CSimulatorSelector::changedLastSelection }; //!< current simulator (used with radio buttons) - BlackMisc::CData m_currentSimulators { this, &CSimulatorSelector::changedLastSelection }; //!< current simulators (used with multiple checkboxes) + BlackMisc::CData m_currentSimulator { this, &CSimulatorSelector::changedLastSelectionRb }; //!< current simulator (used with radio buttons) + BlackMisc::CData m_currentSimulators { this, &CSimulatorSelector::changedLastSelectionCb }; //!< current simulators (used with multiple checkboxes) }; } // ns } // ns