X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Ftoolbars%2Fmainbar.cpp;h=1875d3c415a34fab1cb8d2c0e65c5e486c16e7cd;hp=6a5992bf53ce60e7872d0e895ba09f49f35646d6;hb=91f8fe8c30131fb438dbdb1b58d69ede7ba9247b;hpb=1e4d7c4d21f72aa6b7078e92c0d159d2bd35eb4a diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 6a5992bf..1875d3c4 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -236,6 +236,8 @@ MainBar::MainBar(Session &session, MainWindow &main_window) : // Device selector menu connect(&device_selector_, SIGNAL(device_selected()), this, SLOT(on_device_selected())); + connect(&session, SIGNAL(device_changed()), + this, SLOT(on_device_changed())); // Setup the decoder button #ifdef ENABLE_DECODE @@ -301,8 +303,6 @@ MainBar::MainBar(Session &session, MainWindow &main_window) : sample_count_.installEventFilter(this); sample_rate_.installEventFilter(this); - QMetaObject::connectSlotsByName(this); - // Setup session_ events connect(&session_, SIGNAL(capture_state_changed(int)), this, SLOT(capture_state_changed(int))); @@ -909,7 +909,11 @@ void MainBar::on_device_selected() } select_device(device); +} +void MainBar::on_device_changed() +{ + update_device_list(); update_device_config_widgets(); }