r22311 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 30 20:42:21 UTC 2017
Author: jghali
Date: Sat Dec 30 20:42:21 2017
New Revision: 22311
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22311
Log:
refactoring of XtgScanner::getFontName()
Modified:
trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22311&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp Sat Dec 30 20:42:21 2017
@@ -401,24 +401,25 @@
}
}
- if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
- {
- qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
- QScopedPointer<MissingFont> dia(new MissingFont(0, fontName, doc));
- if (dia->exec())
- {
- PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
- fontName = dia->getReplacementFont();
- }
- else
- {
- PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = doc->itemToolPrefs().textFont;
- fontName = doc->itemToolPrefs().textFont;
- }
- qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+ if (PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
+ {
+ fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+ return fontName;
+ }
+
+ qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+ QScopedPointer<MissingFont> dia(new MissingFont(0, fontName, doc));
+ if (dia->exec())
+ {
+ PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
+ fontName = dia->getReplacementFont();
}
else
- fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+ {
+ PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = doc->itemToolPrefs().textFont;
+ fontName = doc->itemToolPrefs().textFont;
+ }
+ qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
return fontName;
}
More information about the scribus-commit
mailing list