From 970a5a3f53defa2ba5bf8616d5977643dc72abdb Mon Sep 17 00:00:00 2001 From: buliabyak Date: Tue, 22 Jan 2008 19:10:21 +0000 Subject: [PATCH] fix clearing in Scale and unit conversion in Skew --- src/ui/dialog/transformation.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 387510b36..e6de92240 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -505,7 +505,16 @@ void Transformation::updatePageSkew(Inkscape::Selection *selection) { if (selection && !selection->isEmpty()) { - _page_skew.set_sensitive(true); + NR::Maybe bbox = selection->bounds(); + if (bbox) { + double w = bbox->extent(NR::X); + double h = bbox->extent(NR::Y); + _scalar_skew_vertical.setHundredPercent(w); + _scalar_skew_horizontal.setHundredPercent(h); + _page_skew.set_sensitive(true); + } else { + _page_skew.set_sensitive(false); + } } else { _page_skew.set_sensitive(false); } @@ -943,8 +952,8 @@ Transformation::onClear() break; } case PAGE_SCALE: { - _scalar_scale_horizontal.setValue(100); - _scalar_scale_vertical.setValue(100); + _scalar_scale_horizontal.setValue(100, "%"); + _scalar_scale_vertical.setValue(100, "%"); break; } case PAGE_SKEW: { -- 2.30.2