Use auto-apply in DeviceOptions popup
authorJoel Holdsworth <joel@airwebreathe.org.uk>
Sat, 12 Oct 2013 11:31:24 +0000 (12:31 +0100)
committerJoel Holdsworth <joel@airwebreathe.org.uk>
Sun, 13 Oct 2013 11:39:43 +0000 (12:39 +0100)
pv/popups/deviceoptions.cpp
pv/popups/deviceoptions.h

index c864865f4c854cea3ae96f8cec14286720c1cd35..ac7c2b78f3c3eb0245e77e3d6dc248e47264e801 100644 (file)
@@ -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
index 50fc4fbab39aa2f8e0b217f2dddec83f4c2e97a4..fd9d03488651162f81a37d92d2802f62c3cd80c0 100644 (file)
@@ -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;