]> sigrok.org Git - pulseview.git/blobdiff - pv/widgets/devicetoolbutton.hpp
Fix #805 by resetting selected device on failure
[pulseview.git] / pv / widgets / devicetoolbutton.hpp
index ed69a4b64a4ef1b0209daf004f2192117a9af8c6..589fbf2338016138be21050dd250032d54a04050 100644 (file)
@@ -70,6 +70,12 @@ public:
                const std::list< std::shared_ptr<devices::Device> > &devices,
                std::shared_ptr<devices::Device> selected);
 
                const std::list< std::shared_ptr<devices::Device> > &devices,
                std::shared_ptr<devices::Device> selected);
 
+       /**
+        * Sets the current device to "no device". Useful for when a selected
+        * device fails to open.
+        */
+       void reset();
+
 private:
        /**
         * Repopulates the menu from the device list.
 private:
        /**
         * Repopulates the menu from the device list.