diff options
Diffstat (limited to 'src/ui/widget/unit-tracker.cpp')
| -rw-r--r-- | src/ui/widget/unit-tracker.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/widget/unit-tracker.cpp b/src/ui/widget/unit-tracker.cpp index 372419c3b..c0d3eec9b 100644 --- a/src/ui/widget/unit-tracker.cpp +++ b/src/ui/widget/unit-tracker.cpp @@ -111,6 +111,13 @@ void UnitTracker::addAdjustment(GtkAdjustment *adj) } } +void UnitTracker::addUnit(Inkscape::Util::Unit const &u) +{ + GtkTreeIter iter; + gtk_list_store_append(_store, &iter); + gtk_list_store_set(_store, &iter, COLUMN_STRING, u.abbr.c_str(), -1); +} + void UnitTracker::setFullVal(GtkAdjustment *adj, gdouble val) { _priorValues[adj] = val; @@ -232,7 +239,7 @@ void UnitTracker::_fixupAdjustments(Inkscape::Util::Unit const oldUnit, Inkscape if ( (oldUnit.type != Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) && (newUnit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) ) { - val = newUnit.factor; + val = newUnit.factor * 100; _priorValues[adj] = Inkscape::Util::Quantity::convert(oldVal, oldUnit, "px"); } else if ( (oldUnit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) && (newUnit.type != Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) ) |
