summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24e302c)
raw | patch | inline | side by side (parent: 24e302c)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 22 Jan 2008 19:10:21 +0000 (19:10 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 22 Jan 2008 19:10:21 +0000 (19:10 +0000) |
src/ui/dialog/transformation.cpp | patch | blob | history |
index 387510b361473ae64f689d3f17e52d6db555d514..e6de922405cad9e19e9b0ae863c9139615f438fa 100644 (file)
Transformation::updatePageSkew(Inkscape::Selection *selection)
{
if (selection && !selection->isEmpty()) {
- _page_skew.set_sensitive(true);
+ NR::Maybe<NR::Rect> 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);
}
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: {