summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/page-sizer.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2009-08-12 14:00:19 +0000
committerJazzyNico <JazzyNico@users.sourceforge.net>2009-08-12 14:00:19 +0000
commit3c5b9a5d0a9df79c757435ad63514287cd5b211b (patch)
tree0a22f3d90db1a915fa9d3c8031e621ae082c23e7 /src/ui/widget/page-sizer.cpp
parentDon't open 'Save as ...' dialog inside the application bundle on OS X when it... (diff)
downloadinkscape-3c5b9a5d0a9df79c757435ad63514287cd5b211b.tar.gz
inkscape-3c5b9a5d0a9df79c757435ad63514287cd5b211b.zip
Fix for Bug #166678 (Paper size or orientation are not used when printing) by Adrian Johnson.
(bzr r8473)
Diffstat (limited to 'src/ui/widget/page-sizer.cpp')
-rw-r--r--src/ui/widget/page-sizer.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 02688a55e..6817d815b 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -345,11 +345,23 @@ PageSizer::setDim (double w, double h, bool changeList)
_changedw_connection.block();
_changedh_connection.block();
+ if ( w != h ) {
+ _landscapeButton.set_sensitive(true);
+ _portraitButton.set_sensitive (true);
+ _landscape = ( w > h );
+ _landscapeButton.set_active(_landscape ? true : false);
+ _portraitButton.set_active (_landscape ? false : true);
+ } else {
+ _landscapeButton.set_sensitive(false);
+ _portraitButton.set_sensitive (false);
+ }
+
if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) {
SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
double const old_height = sp_document_height(doc);
sp_document_set_width (doc, w, &_px_unit);
sp_document_set_height (doc, h, &_px_unit);
+ sp_document_set_landscape (doc, _landscape);
// The origin for the user is in the lower left corner; this point should remain stationary when
// changing the page size. The SVG's origin however is in the upper left corner, so we must compensate for this
Geom::Translate const vert_offset(Geom::Point(0, (old_height - h)));
@@ -357,17 +369,6 @@ PageSizer::setDim (double w, double h, bool changeList)
sp_document_done (doc, SP_VERB_NONE, _("Set page size"));
}
- if ( w != h ) {
- _landscapeButton.set_sensitive(true);
- _portraitButton.set_sensitive (true);
- _landscape = ( w > h );
- _landscapeButton.set_active(_landscape ? true : false);
- _portraitButton.set_active (_landscape ? false : true);
- } else {
- _landscapeButton.set_sensitive(false);
- _portraitButton.set_sensitive (false);
- }
-
if (changeList)
{
Gtk::TreeModel::Row row = (*find_paper_size(w, h));