summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-11-28 10:44:22 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-28 12:11:29 -0800
commit38179f49d4d668dcc1057085416635efc599722e (patch)
treeb234638f938c829cde6c395b606e23b79f9fe095 /qt-gui.cpp
parenta172bbef58958ac91d27661e0e1f345d261dc627 (diff)
downloadsubsurface-38179f49d4d668dcc1057085416635efc599722e.tar.gz
Fix editing of negative temperatures
We tried to clean up the temperature string (to remove degree characters and unit names etc) a bit too aggressively, and removed the sign character too.. Fixes #306 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 57e410865..c4624c666 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -435,7 +435,7 @@ int parseTemperatureToMkelvin(const QString& text)
{
int mkelvin;
QString numOnly = text;
- numOnly.replace(",",".").remove(QRegExp("[^0-9.]"));
+ numOnly.replace(",",".").remove(QRegExp("[^-0-9.]"));
if (numOnly == "")
return 0;
double number = numOnly.toDouble();