From: buliabyak Date: Tue, 22 Jan 2008 19:10:21 +0000 (+0000) Subject: fix clearing in Scale and unit conversion in Skew X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=970a5a3f53defa2ba5bf8616d5977643dc72abdb;p=inkscape.git fix clearing in Scale and unit conversion in Skew --- 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: {