r19613 by jghali - fix font replacement dialog not being shown when opening doc with missing fonts
scribus-commit
scribus-commit at lists.scribus.net
Tue Oct 28 12:35:29 UTC 2014
Author: jghali
Date: Tue Oct 28 12:35:29 2014
New Revision: 19613
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19613
Log:
fix font replacement dialog not being shown when opening doc with missing fonts
Modified:
trunk/Scribus/scribus/fileloader.cpp
Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19613&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp (original)
+++ trunk/Scribus/scribus/fileloader.cpp Tue Oct 28 12:35:29 2014
@@ -436,34 +436,33 @@
currDoc->docHyphenator->MinWordLen=currDoc->hyphMinimumWordLength();
currDoc->docHyphenator->HyCount=currDoc->hyphConsecutiveLines();
}
+
+ ReplacedFonts = currDoc->AllFonts->getSubstitutions(ReplacedFonts.keys());
if (ReplacedFonts.isEmpty())
return true;
- ReplacedFonts = currDoc->AllFonts->getSubstitutions(ReplacedFonts.keys());
- if (ReplacedFonts.count() != 0)
- {
- if ((prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
- {
- qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
- FontReplaceDialog dia(0, &ReplacedFonts);
- if (dia.exec())
+
+ if ((prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
+ {
+ qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+ FontReplaceDialog dia(0, &ReplacedFonts);
+ if (dia.exec())
+ {
+ QMap<QString,QString>::Iterator itfsu;
+ for (itfsu = ReplacedFonts.begin(); itfsu != ReplacedFonts.end(); ++itfsu)
{
- QMap<QString,QString>::Iterator itfsu;
- for (itfsu = ReplacedFonts.begin(); itfsu != ReplacedFonts.end(); ++itfsu)
- {
- if (dia.stickyReplacements->isChecked())
- prefsManager->appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
- }
- currDoc->AllFonts->setSubstitutions(ReplacedFonts, currDoc);
- ResourceCollection repl;
- repl.availableFonts = currDoc->AllFonts;
- repl.mapFonts(ReplacedFonts);
- currDoc->replaceNamedResources(repl);
- return true;
+ if (dia.stickyReplacements->isChecked())
+ prefsManager->appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
}
- else
- {
- return false;
- }
+ currDoc->AllFonts->setSubstitutions(ReplacedFonts, currDoc);
+ ResourceCollection repl;
+ repl.availableFonts = currDoc->AllFonts;
+ repl.mapFonts(ReplacedFonts);
+ currDoc->replaceNamedResources(repl);
+ return true;
+ }
+ else
+ {
+ return false;
}
}
More information about the scribus-commit
mailing list