From 991458492cc9ac79e9003897f63e871ce158a104 Mon Sep 17 00:00:00 2001 From: Adeel Asghar Date: Wed, 7 Jul 2021 14:30:24 +0200 Subject: [PATCH] Fix editing of legend titles (#7670) Fixes #7627 --- OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp b/OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp index 13f90b91bc0..707d88a7268 100644 --- a/OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp +++ b/OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp @@ -2212,7 +2212,7 @@ bool SetupDialog::setupPlotCurve(VariablePageWidget *pVariablePageWidget) PlotCurve *pPlotCurve = pVariablePageWidget->getPlotCurve(); /* set the legend title */ - if (pPlotCurve->title().text().compare(pVariablePageWidget->getLegendTextBox()->text()) == 0) { + if (pPlotCurve->getCustomTitle().isEmpty() && pPlotCurve->title().text().compare(pVariablePageWidget->getLegendTextBox()->text()) == 0) { pPlotCurve->setCustomTitle(""); } else { pPlotCurve->setCustomTitle(pVariablePageWidget->getLegendTextBox()->text());