X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=dc5f981f7b3a5207ab0bc777e1656e292d12784b;hb=bb4c67698d836703257e9559d1a98cb3819c61a5;hp=9873541dd5dbe4dc24aea9be777a949cc15c0e96;hpb=c8c28626464eb310255dacf542f2501cf2f74d38;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 9873541d..dc5f981f 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -388,8 +388,19 @@ void MainWindow::add_decoder(QObject *action) (srd_decoder*)((QAction*)action)->data().value(); assert(dec); - dialogs::Decoder dlg(this); - dlg.exec(); + const std::vector< boost::shared_ptr > &sigs = + _session.get_signals(); + + GHashTable *const options = g_hash_table_new_full(g_str_hash, + g_str_equal, g_free, (GDestroyNotify)g_variant_unref); + + dialogs::Decoder dlg(this, dec, sigs, options); + if(dlg.exec() != QDialog::Accepted) { + g_hash_table_destroy(options); + return; + } + + _session.add_decoder(dec, dlg.get_probes(), options); } void MainWindow::run_stop()