r21949 by craig - Coverity 1405382: Remove logically dead code as ori not =0 is not portraitPage

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 10:45:06 UTC 2017


Author: craig
Date: Fri Apr 21 10:45:06 2017
New Revision: 21949

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21949
Log:
Coverity 1405382: Remove logically dead code as ori not =0 is not portraitPage

Modified:
    trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp

Modified: trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21949&path=/trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	Fri Apr 21 10:45:06 2017
@@ -264,11 +264,11 @@
 	}
 	else
 	{
-		if ((ori != 0) && (ori != oldOri))
+		if ((ori != portraitPage) && (ori != oldOri))
 		{
 			double w = widthSpinBox->value(), h = heightSpinBox->value();
-			widthSpinBox->setValue((ori == portraitPage) ? qMin(w, h) : qMax(w, h));
-			heightSpinBox->setValue((ori == portraitPage) ? qMax(w, h) : qMin(w, h));
+			widthSpinBox->setValue(qMax(w, h));
+			heightSpinBox->setValue(qMin(w, h));
 		}
 	}
 	oldOri = ori;




More information about the scribus-commit mailing list