r21256 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 29 23:08:59 UTC 2016


Author: jghali
Date: Fri Apr 29 23:08:59 2016
New Revision: 21256

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21256
Log:
#13998 related: fix activation issues of FromSubset/ToSubset buttons when changing font embedding mode

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

Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21256&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp	Fri Apr 29 23:08:59 2016
@@ -1320,12 +1320,14 @@
 {
 	PDFOptions::PDFFontEmbedding embeddingMode = fontEmbeddingMode();
 
+	EmbedList->clearSelection();
 	EmbedList->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
 	EmbedFonts->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
+	SubsetList->clearSelection();
 	SubsetList->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
 	SubsetFonts->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
-	ToSubset->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
-	FromSubset->setEnabled(embeddingMode == PDFOptions::EmbedFonts);
+	ToSubset->setEnabled(false); // Will be enabled when user select a font in appropriate list
+	FromSubset->setEnabled(false); // Will be enabled when user select a font in appropriate list
 }
 
 void TabPDFOptions::RemoveSubset()
@@ -1386,15 +1388,12 @@
 	QList<QListWidgetItem*> selection = SubsetList->selectedItems();
 	int enabledForEmbedding = selection.count();
 
-	if (PDFVersionCombo->currentIndex() == 4)
-	{
-		for (int i = 0; i < selection.count(); ++i)
-		{
-			const QListWidgetItem* item = selection.at(i);
-			const ScFace face = AllFonts[item->text()];
-			if (face.isOTF() || face.subset())
-				enabledForEmbedding--;
-		}
+	for (int i = 0; i < selection.count(); ++i)
+	{
+		const QListWidgetItem* item = selection.at(i);
+		const ScFace face = AllFonts[item->text()];
+		if (face.isOTF() || face.subset())
+			enabledForEmbedding--;
 	}
 
 	FromSubset->setEnabled(enabledForEmbedding > 0);




More information about the scribus-commit mailing list