diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-08-28 02:53:42 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-08-28 02:53:42 +0000 |
| commit | df50dc11aa33a9ceeaa0cac84dd3a869680e998f (patch) | |
| tree | eebf515b23c4c905c646ced1eb37f56b2e74aeb8 /src/ui/widget | |
| parent | Added Quantity comparison functions. (diff) | |
| download | inkscape-df50dc11aa33a9ceeaa0cac84dd3a869680e998f.tar.gz inkscape-df50dc11aa33a9ceeaa0cac84dd3a869680e998f.zip | |
Use Quantity comparisons in PageSizer.
(bzr r12475.1.8)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 94c7b453a..051937c43 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -486,10 +486,10 @@ PageSizer::setDim (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h, bool DocumentUndo::done(doc, SP_VERB_NONE, _("Set page size")); } - if ( w.quantity != h.quantity ) { + if ( w != h ) { _landscapeButton.set_sensitive(true); _portraitButton.set_sensitive (true); - _landscape = ( w.quantity > h.quantity ); + _landscape = ( w > h ); _landscapeButton.set_active(_landscape ? true : false); _portraitButton.set_active (_landscape ? false : true); } else { @@ -553,7 +553,7 @@ PageSizer::find_paper_size (Inkscape::Util::Quantity w, Inkscape::Util::Quantity { double smaller = w.quantity; double larger = h.quantity; - if ( h.quantity < w.quantity ) { + if ( h < w ) { smaller = h.quantity; larger = w.quantity; } @@ -674,7 +674,7 @@ PageSizer::on_portrait() return; Inkscape::Util::Quantity w = Inkscape::Util::Quantity(_dimensionWidth.getValue(""), _dimensionWidth.getUnit()); Inkscape::Util::Quantity h = Inkscape::Util::Quantity(_dimensionHeight.getValue(""), _dimensionHeight.getUnit()); - if (h.quantity < w.quantity) { + if (h < w) { setDim (h, w); } } @@ -690,7 +690,7 @@ PageSizer::on_landscape() return; Inkscape::Util::Quantity w = Inkscape::Util::Quantity(_dimensionWidth.getValue(""), _dimensionWidth.getUnit()); Inkscape::Util::Quantity h = Inkscape::Util::Quantity(_dimensionHeight.getValue(""), _dimensionHeight.getUnit()); - if (w.quantity < h.quantity) { + if (w < h) { setDim (h, w); } } |
