plots: Add plot names

This commit is contained in:
Mike Walters
2016-04-17 23:03:38 +01:00
parent ede1a547f4
commit bdadbef3e6
3 changed files with 13 additions and 6 deletions

View File

@@ -66,8 +66,9 @@ void PlotView::contextMenuEvent(QContextMenuEvent * event)
auto src = selectedPlot->output();
auto compatiblePlots = as_range(Plots::plots.equal_range(src->sampleType()));
for (auto p : compatiblePlots) {
auto action = new QAction("Add plot", &menu);
auto plotCreator = p.second;
auto plotInfo = p.second;
auto action = new QAction(QString("Add %1").arg(plotInfo.name), &menu);
auto plotCreator = plotInfo.creator;
connect(
action, &QAction::triggered,
this, [=]() {