summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/unit-tracker.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-07-31 20:45:07 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-07-31 20:45:07 +0000
commitc135cb8c39a4004e9eb8adb227ba4c54848a8c45 (patch)
tree3745b186ec8498de76f60c7ceada8da787405259 /src/ui/widget/unit-tracker.cpp
parentCleanup. (diff)
downloadinkscape-c135cb8c39a4004e9eb8adb227ba4c54848a8c45.tar.gz
inkscape-c135cb8c39a4004e9eb8adb227ba4c54848a8c45.zip
Added percent support back to select toolbar.
(bzr r12380.1.53)
Diffstat (limited to 'src/ui/widget/unit-tracker.cpp')
-rw-r--r--src/ui/widget/unit-tracker.cpp9
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) )