summaryrefslogtreecommitdiffstats
path: root/scribus/propertiespalette.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-02-09 21:58:43 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-02-09 21:58:43 +0000
commitcee06e59c897fd7b66365c838248b394e047098e (patch)
treeb1b65552af2c89fcb0e42c4fe168f25397550c85 /scribus/propertiespalette.cpp
parente0bd74929381710c3ecb2ba3fe3b9d54f914e88b (diff)
downloadscribus-cee06e59c897fd7b66365c838248b394e047098e.tar.gz
scribus-cee06e59c897fd7b66365c838248b394e047098e.tar.xz
scribus-cee06e59c897fd7b66365c838248b394e047098e.zip
#10570: Set PDF page number widget disabled when PDF file missing and only set maximum if found
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17286 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/propertiespalette.cpp')
-rw-r--r--scribus/propertiespalette.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/scribus/propertiespalette.cpp b/scribus/propertiespalette.cpp
index 32f49ed..168da4f 100644
--- a/scribus/propertiespalette.cpp
+++ b/scribus/propertiespalette.cpp
@@ -2114,10 +2114,19 @@ void PropertiesPalette::SetCurItem(PageItem *i)
}
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());