]> sigrok.org Git - pulseview.git/commit
Reworked SamplingBar device selection logic
authorJoel Holdsworth <redacted>
Sun, 16 Mar 2014 09:54:04 +0000 (10:54 +0100)
committerJoel Holdsworth <redacted>
Sun, 16 Mar 2014 10:18:59 +0000 (11:18 +0100)
commite95e8563a1de0d2045cb8f30083889896b6c94df
tree3b65e70d692974cca19b1ac87d1ae6ed0a11d935
parent65a53225414471cb2701db2429aa3ab9e74e5b21
Reworked SamplingBar device selection logic

  * Split on_device_selected into update_device_config_widgets. This allows
    the widgets to be updated with calling SigSession::set_device.

  * Don't rely on the on_device_selected event handler to update the device
    config widgets. If MainWindow selects a device, that device may be the
    0th drop-down element, and already selected in which case there will be
    no device_selected signal, because there was no change in the selection.
    We now surpress on_device_selected with _updating_device_selector, then
    set the selected device in the drop-down, then call
    update_device_config_widgets to manually update the widgets.

  * Combined set_selected_device into set_device_list, so that the two can
    be set in one operation.

  * This fixes bug #334
pv/mainwindow.cpp
pv/toolbars/samplingbar.cpp
pv/toolbars/samplingbar.h