diff --git a/doc/index.docbook b/doc/index.docbook
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -43,8 +43,8 @@
&FDLNotice;
-2018-11-09
-1.2.2 (Applications 18.12)
+2018-11-16
+1.3.0 (Applications 19.04)
@@ -580,6 +580,12 @@
+
+ Show "+" for positive numbers
+
+ If checked, every positive number on the plot is prepended with +
.
+
+
diff --git a/doc/settings-diagram.png b/doc/settings-diagram.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@Check this box if axes should have arrows.
true
+
+
+ Check this box if plus should be prepended to every positive number on the plot.
+ true
+
Enter the width of the grid lines.
diff --git a/kmplot/kmplotio.cpp b/kmplot/kmplotio.cpp
--- a/kmplot/kmplotio.cpp
+++ b/kmplot/kmplotio.cpp
@@ -84,6 +84,7 @@
addTag( doc, tag, "show-axes", Settings::showAxes() ? "1" : "-1" );
addTag( doc, tag, "show-arrows", Settings::showArrows() ? "1" : "-1" );
addTag( doc, tag, "show-label", Settings::showLabel() ? "1" : "-1" );
+ addTag( doc, tag, "show-plus", Settings::showPlus() ? "1" : "-1" );
addTag( doc, tag, "xmin", Settings::xMin() );
addTag( doc, tag, "xmax", Settings::xMax() );
@@ -422,12 +423,14 @@
Settings::setShowAxes( true );
Settings::setShowArrows( true );
Settings::setShowLabel( true );
+ Settings::setShowPlus( true );
}
else
{
Settings::setShowAxes( n.namedItem( "show-axes" ).toElement().text().toInt() == 1 );
Settings::setShowArrows( n.namedItem( "show-arrows" ).toElement().text().toInt() == 1 );
Settings::setShowLabel( n.namedItem( "show-label" ).toElement().text().toInt() == 1 );
+ Settings::setShowPlus( n.namedItem( "show-plus" ).toElement().text().isEmpty() || n.namedItem( "show-plus" ).toElement().text().toInt() == 1 );
}
Settings::setXMin( n.namedItem( "xmin" ).toElement().text() );
diff --git a/kmplot/settingspagediagram.ui b/kmplot/settingspagediagram.ui
--- a/kmplot/settingspagediagram.ui
+++ b/kmplot/settingspagediagram.ui
@@ -295,6 +295,22 @@
-
+
+
+ prepend "+" to every positive number on the diagram
+
+
+ Check this if every positive number on the plot should be prepended with "+".
+
+
+ Show "+" for positive numbers
+
+
+ true
+
+
+
+ -
Qt::Vertical
diff --git a/kmplot/view.cpp b/kmplot/view.cpp
--- a/kmplot/view.cpp
+++ b/kmplot/view.cpp
@@ -3314,7 +3314,7 @@
else
numberText = QString::number( x*(pow(10.0,decimalPlaces)), 'f', 0 ) + QString( -decimalPlaces, '0' );
- if ( x > 0.0 )
+ if ( x > 0.0 && Settings::showPlus() )
numberText.prepend('+');
break;