Skip to content

Commit

Permalink
ticket:4369 Do not use square brackets for units.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Apr 25, 2017
1 parent 9b947e8 commit 8897145
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OMPlot/OMPlotGUI/PlotCurve.cpp
Expand Up @@ -71,7 +71,7 @@ void PlotCurve::setTitleLocal()
if (getDisplayUnit().isEmpty()) {
QwtPlotItem::setTitle(getName());
} else {
QwtPlotItem::setTitle(getName() + " [" + getDisplayUnit() + "]");
QwtPlotItem::setTitle(QString("%1 (%2)").arg(getName(), getDisplayUnit()));
}
}

Expand Down
6 changes: 3 additions & 3 deletions OMPlot/OMPlotGUI/PlotPicker.cpp
Expand Up @@ -163,10 +163,10 @@ QwtText PlotPicker::trackerText(const QPoint &pos) const
mpPointMarker->setVisible(true);
QString timeUnit = "";
if (!mpPlot->getParentPlotWindow()->getTimeUnit().isEmpty()) {
timeUnit = QString("[%1]").arg(mpPlot->getParentPlotWindow()->getTimeUnit());
timeUnit = QString("%1").arg(mpPlot->getParentPlotWindow()->getTimeUnit());
}
QString toolTip = QString("Name: <b>%1</b><br />Value: <b>%2</b> at <b>%3 %4</b><br />Filename: <b>%5</b>")
.arg(pPlotCurve->title().text())
QString toolTip = QString("Name: <b>%1</b> %2<br />Value: <b>%3</b> at <b>%4</b> %5<br />Filename: <b>%6</b>")
.arg(pPlotCurve->getName()).arg(pPlotCurve->getDisplayUnit())
.arg(pPlotCurve->mYAxisVector.at(index))
.arg(pPlotCurve->mXAxisVector.at(index))
.arg(timeUnit)
Expand Down

0 comments on commit 8897145

Please sign in to comment.