Skip to content

Commit

Permalink
Fix editing of legend titles (#7670)
Browse files Browse the repository at this point in the history
Fixes #7627
  • Loading branch information
adeas31 committed Jul 7, 2021
1 parent 2ab03da commit 9914584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMPlot/OMPlot/OMPlotGUI/PlotWindow.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 9914584

Please sign in to comment.