mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
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>
This commit is contained in:
parent
a172bbef58
commit
38179f49d4
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue