r18190 by jghali - fix potential crash in pdf export caused by incorrect prefs being set when enabling color management and not going to pdf export prefs afterwards
scribus-commit
scribus-commit at lists.scribus.net
Sat Mar 9 16:43:21 UTC 2013
Author: jghali
Date: Sat Mar 9 16:43:21 2013
New Revision: 18190
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18190
Log:
fix potential crash in pdf export caused by incorrect prefs being set when enabling color management and not going to pdf export prefs afterwards
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18190&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Mar 9 16:43:21 2013
@@ -446,7 +446,7 @@
docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
- docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
AddFont(appPrefsData.itemToolPrefs.textFont);//, prefsData.AvailFonts[prefsData.itemToolPrefs.textFont]->Font);
@@ -815,7 +815,7 @@
docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
- docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
BlackPoint = docPrefsData.colorPrefs.DCMSset.BlackPoint;
SoftProofing = docPrefsData.colorPrefs.DCMSset.SoftProofOn;
@@ -1069,7 +1069,8 @@
docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
- docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
m_ScMW->recalcColors(m_ScMW->mainWindowProgressBar);
RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, m_ScMW->mainWindowProgressBar);
}
@@ -16443,7 +16444,8 @@
docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
- docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+ docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
updCol = true;
}
else
Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18190&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp Sat Mar 9 16:43:21 2013
@@ -479,13 +479,12 @@
{
solidColorProfileComboBox->addItem(itp.key());
if (itp.key() == tp)
- {
- if (cmsUse)
- solidColorProfileComboBox->setCurrentIndex(solidColorProfileComboBox->count()-1);
- }
- }
- if (cmsUse)
- solidColorRenderingIntentComboBox->setCurrentIndex(Opts.Intent);
+ solidColorProfileComboBox->setCurrentIndex(solidColorProfileComboBox->count()-1);
+ }
+ int solidIntent = Opts.Intent;
+ if (Opts.Intent < 0)
+ solidIntent = 1;
+ solidColorRenderingIntentComboBox->setCurrentIndex(solidIntent);
QString tp1 = Opts.ImageProf;
if (!ScCore->InputProfiles.contains(tp1))
{
@@ -501,13 +500,12 @@
{
imageProfileComboBox->addItem(itp2.key());
if (itp2.key() == tp1)
- {
- if (cmsUse)
- imageProfileComboBox->setCurrentIndex(imageProfileComboBox->count()-1);
- }
- }
- if (cmsUse)
- imageRenderingIntentComboBox->setCurrentIndex(Opts.Intent2);
+ imageProfileComboBox->setCurrentIndex(imageProfileComboBox->count()-1);
+ }
+ int imageIntent = Opts.Intent2;
+ if (imageIntent < 0)
+ imageIntent = 0;
+ imageRenderingIntentComboBox->setCurrentIndex(imageIntent);
if (!cmsUse)
{
//Disabling vis hiding
More information about the scribus-commit
mailing list