X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=183e841e804c3c6f48d37949268ec3227a0c70be;hp=f7b8612054ff058997a8cd0f2cd3f75b8310f5a0;hb=3045c869ada2e32bf55cbb68633b5213b9b11e28;hpb=4d3c4e342104dcba47c252e734dee441faaf2a9e diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index f7b86120..183e841e 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -41,6 +41,7 @@ #include "dialogs/connect.h" #include "dialogs/decoder.h" #include "toolbars/samplingbar.h" +#include "view/logicsignal.h" #include "view/view.h" /* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */ @@ -375,13 +376,21 @@ void MainWindow::add_decoder(QObject *action) (srd_decoder*)((QAction*)action)->data().value(); assert(dec); - const std::vector< boost::shared_ptr > &sigs = + vector< shared_ptr > logic_sigs; + const vector< shared_ptr > &sigs = _session.get_signals(); + BOOST_FOREACH(shared_ptr s, sigs) { + assert(s); + shared_ptr l = + dynamic_pointer_cast(s); + if (l) + logic_sigs.push_back(l); + } 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); + dialogs::Decoder dlg(this, dec, logic_sigs, options); if(dlg.exec() != QDialog::Accepted) { g_hash_table_destroy(options); return;