summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 36f639f)
raw | patch | inline | side by side (parent: 36f639f)
author | jaspervdg <jaspervdg@users.sourceforge.net> | |
Mon, 8 Dec 2008 10:21:58 +0000 (10:21 +0000) | ||
committer | jaspervdg <jaspervdg@users.sourceforge.net> | |
Mon, 8 Dec 2008 10:21:58 +0000 (10:21 +0000) |
src/ui/widget/page-sizer.cpp | patch | blob | history |
index 99c92aa859d4bf0b876c7ee5b818524143734c98..cdb0feff30b68b52db7631c794ae6df6b77f2c52 100644 (file)
sp_document_done (doc, SP_VERB_NONE, _("Set page size"));
}
- _landscape = ( w > h );
- _landscapeButton.set_active(_landscape ? true : false);
- _portraitButton.set_active (_landscape ? false : true);
+ 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)
{
// enforce landscape mode if this is desired for the given page format
_landscape = true;
} else {
- // otherwise we set portrait mode because
- _landscape = false;
+ // otherwise we keep the current mode
+ _landscape = _landscapeButton.get_active();
}
SPUnit const &src_unit = sp_unit_get_by_id (paper.unit);