Really display liters with script el

In commit 125ddd955c ("Display liters with script el") Robert only fixed
the C routine we use to show units. Strangely, we had a separately
implemented C++ function as well. Instead of implementing this in two
spots I now simply have the C++ function use the C function to do the
actual work and then wrap this into an easier to use (from UI code)
QString output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-08 20:31:11 -07:00
parent e6fc5d2370
commit 11380a5deb
2 changed files with 5 additions and 10 deletions

View file

@ -538,7 +538,7 @@ volume_t string_to_volume(const char *str, pressure_t workp)
QString local_cuft = CylindersModel::tr("cuft");
volume_t volume;
if (rest.startsWith("l") || rest.startsWith(local_l))
if (rest.startsWith("l") || rest.startsWith("") || rest.startsWith(local_l))
goto l;
if (rest.startsWith("cuft") || rest.startsWith(local_cuft))
goto cuft;