r17286 by craig - #10570: Set PDF page number widget disabled when PDF file missing and only set maximum if found

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 9 21:58:43 UTC 2012


Author: craig
Date: Thu Feb  9 21:58:43 2012
New Revision: 17286

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17286
Log:
#10570: Set PDF page number widget disabled when PDF file missing and only set maximum if found

Modified:
    branches/Version14x/Scribus/scribus/propertiespalette.cpp

Modified: branches/Version14x/Scribus/scribus/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17286&path=/branches/Version14x/Scribus/scribus/propertiespalette.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/propertiespalette.cpp (original)
+++ branches/Version14x/Scribus/scribus/propertiespalette.cpp Thu Feb  9 21:58:43 2012
@@ -2114,10 +2114,19 @@
 	}
 	if (CurItem->asImageFrame())
 	{
-		disconnect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
-		imagePageNumber->setMaximum(CurItem->pixm.imgInfo.numberOfPages);
-		imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
-		connect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
+		if (CurItem->PictureIsAvailable)
+		{
+			disconnect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
+			imagePageNumber->setMaximum(CurItem->pixm.imgInfo.numberOfPages);
+			imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
+			connect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
+			imagePageNumber->setEnabled(true);
+		}
+		else
+		{
+			imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
+			imagePageNumber->setEnabled(false);
+		}
 	}
 	Revert->setChecked(CurItem->reversed());
 	setTextFlowMode(CurItem->textFlowMode());




More information about the scribus-commit mailing list