r19885 by craig - #12927: Hide 3 and 4 fold document options if and only if they are not set in the current doc or in preferences

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 25 22:52:59 UTC 2015


Author: craig
Date: Wed Feb 25 22:52:59 2015
New Revision: 19885

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19885
Log:
#12927: Hide 3 and 4 fold document options if and only if they are not set in the current doc or in preferences

Modified:
    trunk/Scribus/scribus/ui/newfile.cpp
    trunk/Scribus/scribus/ui/prefs_documentsetup.cpp

Modified: trunk/Scribus/scribus/ui/newfile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19885&path=/trunk/Scribus/scribus/ui/newfile.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newfile.cpp (original)
+++ trunk/Scribus/scribus/ui/newfile.cpp Wed Feb 25 22:52:59 2015
@@ -203,19 +203,14 @@
 			ic = new QListWidgetItem( QIcon(loadIcon("32/page-doublesided.png")), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 		}
-		else if (pg == 2)
+		else if (pg == 2 && prefsManager->appPrefs.docSetupPrefs.pagePositioning == 2)
 		{
 			ic = new QListWidgetItem( QIcon(loadIcon("32/page-3fold.png")), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 		}
-		else if (pg == 3)
+		else if (pg == 3 && prefsManager->appPrefs.docSetupPrefs.pagePositioning == 3)
 		{
 			ic = new QListWidgetItem( QIcon(loadIcon("32/page-4fold.png")), psname, layoutsView );
-			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
-		}
-		else
-		{
-			ic = new QListWidgetItem( QIcon(loadIcon("32/page-simple.png")), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 		}
 	}

Modified: trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19885&path=/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetup.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetup.cpp Wed Feb 25 22:52:59 2015
@@ -135,6 +135,11 @@
 	pageWidthSpinBox->setValue(pageW * unitRatio);
 	pageHeightSpinBox->setValue(pageH * unitRatio);
 	pageSets=prefsData->pageSets;
+	if (prefsData->docSetupPrefs.pagePositioning < 2)
+	{
+		threeFoldRadioButton->hide();
+		fourFoldRadioButton->hide();
+	}
 	switch (prefsData->docSetupPrefs.pagePositioning)
 	{
 		case 0:




More information about the scribus-commit mailing list