summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/scalar-unit.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-06 18:54:40 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-06 18:54:40 +0000
commitbb88a2cb94ec34ee838a972bab17ca05ba92d1da (patch)
tree4b4580dbe1bec0968254d1b362611ab57ad3c223 /src/ui/widget/scalar-unit.cpp
parentinit SPStyle better: fixes a bunch of bugs resulting from improper re-init of... (diff)
parentFixed bug in page sizer. (diff)
downloadinkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.tar.gz
inkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.zip
Merge Google Summer of Code unit refactor.
(bzr r12471)
Diffstat (limited to 'src/ui/widget/scalar-unit.cpp')
-rw-r--r--src/ui/widget/scalar-unit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/widget/scalar-unit.cpp b/src/ui/widget/scalar-unit.cpp
index 99ff70846..2f4c1f341 100644
--- a/src/ui/widget/scalar-unit.cpp
+++ b/src/ui/widget/scalar-unit.cpp
@@ -16,6 +16,8 @@
#include "scalar-unit.h"
#include "spinbutton.h"
+using Inkscape::Util::unit_table;
+
namespace Inkscape {
namespace UI {
namespace Widget {
@@ -226,9 +228,8 @@ void ScalarUnit::on_unit_changed()
Glib::ustring abbr = _unit_menu->getUnitAbbr();
_suffix->set_label(abbr);
- Inkscape::Util::UnitTable &table = _unit_menu->getUnitTable();
- Inkscape::Util::Unit new_unit = (table.getUnit(abbr));
- Inkscape::Util::Unit old_unit = (table.getUnit(lastUnits));
+ Inkscape::Util::Unit new_unit = (unit_table.getUnit(abbr));
+ Inkscape::Util::Unit old_unit = (unit_table.getUnit(lastUnits));
double convertedVal = 0;
if (old_unit.type == UNIT_TYPE_DIMENSIONLESS && new_unit.type == UNIT_TYPE_LINEAR) {