Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plotjuggler_app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,17 @@ void MainWindow::onPlotAdded(PlotWidget* plot)
plot->setDefaultStyle(ui->buttonDots->isChecked() ? PlotWidgetBase::LINES_AND_DOTS :
PlotWidgetBase::LINES);

// Inherit legend settings from current state
plot->activateLegend(_labels_status != LabelStatus::HIDDEN);
if (_labels_status == LabelStatus::LEFT)
{
plot->setLegendAlignment(Qt::AlignLeft);
}
else if (_labels_status == LabelStatus::RIGHT)
{
plot->setLegendAlignment(Qt::AlignRight);
}

QSettings settings;
bool swap_pan_zoom = settings.value("Preferences::swap_pan_zoom", false).toBool();
plot->setSwapZoomPan(swap_pan_zoom);
Expand Down
Loading