From: Joel Holdsworth Date: Sat, 12 Oct 2013 11:31:24 +0000 (+0100) Subject: Use auto-apply in DeviceOptions popup X-Git-Tag: pulseview-0.2.0~254 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b786fcfd36fed2282a6602f26d74c2926957aff6;p=pulseview.git Use auto-apply in DeviceOptions popup --- diff --git a/pv/popups/deviceoptions.cpp b/pv/popups/deviceoptions.cpp index c864865f..ac7c2b78 100644 --- a/pv/popups/deviceoptions.cpp +++ b/pv/popups/deviceoptions.cpp @@ -41,12 +41,7 @@ DeviceOptions::DeviceOptions(sr_dev_inst *sdi, QWidget *parent) : { setLayout(&_layout); - _layout.addWidget(_binding.get_property_form(this)); -} - -void DeviceOptions::closeEvent(QCloseEvent*) -{ - _binding.commit(); + _layout.addWidget(_binding.get_property_form(this, true)); } } // namespace popups diff --git a/pv/popups/deviceoptions.h b/pv/popups/deviceoptions.h index 50fc4fba..fd9d0348 100644 --- a/pv/popups/deviceoptions.h +++ b/pv/popups/deviceoptions.h @@ -37,9 +37,6 @@ class DeviceOptions : public pv::widgets::Popup public: DeviceOptions(sr_dev_inst *sdi, QWidget *parent); -private: - void closeEvent(QCloseEvent*); - private: sr_dev_inst *const _sdi;