X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fwidgets%2Fexportmenu.cpp;fp=pv%2Fwidgets%2Fexportmenu.cpp;h=e9fb4150765e76e05eeb049f117aba089e82cba5;hb=686d9151feb1c917b85ddb60bf73888e8058e4f4;hp=4fa9d197726f1c25da09e952da56c7d317ec4dc7;hpb=2220e94218298b208041c5e828595d9e1b842c88;p=pulseview.git diff --git a/pv/widgets/exportmenu.cpp b/pv/widgets/exportmenu.cpp index 4fa9d19..e9fb415 100644 --- a/pv/widgets/exportmenu.cpp +++ b/pv/widgets/exportmenu.cpp @@ -40,16 +40,23 @@ namespace pv { namespace widgets { ExportMenu::ExportMenu(QWidget *parent, shared_ptr context, - QAction *open_action) : + std::vectoropen_actions) : QMenu(parent), context_(context), mapper_(this) { assert(context); - if (open_action) { - addAction(open_action); - setDefaultAction(open_action); + if (!open_actions.empty()) { + bool first_action = true; + for (auto open_action : open_actions) { + addAction(open_action); + + if (first_action) { + first_action = false; + setDefaultAction(open_action); + } + } addSeparator(); }