]> sigrok.org Git - pulseview.git/commitdiff
SamplingBar: Surpressed a spurious update loop
authorJoel Holdsworth <redacted>
Sat, 1 Mar 2014 08:51:58 +0000 (08:51 +0000)
committerJoel Holdsworth <redacted>
Sat, 1 Mar 2014 11:15:01 +0000 (11:15 +0000)
pv/toolbars/samplingbar.cpp

index f58f4fc38fd60c2ecedce0aefae3bd8468fa6ffa..78f6e1cef53a7929bd87b86914a5404ca53eabef 100644 (file)
@@ -115,8 +115,6 @@ void SamplingBar::set_device_list(
        }
 
        _updating_device_selector = false;
-
-       on_device_selected();
 }
 
 shared_ptr<pv::device::DevInst> SamplingBar::get_selected_device() const
@@ -145,6 +143,8 @@ void SamplingBar::set_selected_device(shared_ptr<pv::device::DevInst> dev_inst)
        for (int i = 0; i < _device_selector.count(); i++)
                if (dev_inst->dev_inst() ==
                        _device_selector.itemData(i).value<void*>()) {
+                       // Calling this leads to on_device_selected being
+                       // invoked, which updates the sampling bar widgets.
                        _device_selector.setCurrentIndex(i);
                        return;
                }