summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/page-sizer.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-28 02:53:42 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-28 02:53:42 +0000
commitdf50dc11aa33a9ceeaa0cac84dd3a869680e998f (patch)
treeeebf515b23c4c905c646ced1eb37f56b2e74aeb8 /src/ui/widget/page-sizer.cpp
parentAdded Quantity comparison functions. (diff)
downloadinkscape-df50dc11aa33a9ceeaa0cac84dd3a869680e998f.tar.gz
inkscape-df50dc11aa33a9ceeaa0cac84dd3a869680e998f.zip
Use Quantity comparisons in PageSizer.
(bzr r12475.1.8)
Diffstat (limited to 'src/ui/widget/page-sizer.cpp')
-rw-r--r--src/ui/widget/page-sizer.cpp10
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);
}
}