r23220 by jghali - Slight robustness and behavior improvement in style change code
scribus-commit
scribus-commit at lists.scribus.net
Fri Sep 27 09:19:44 UTC 2019
Author: jghali
Date: Fri Sep 27 09:19:44 2019
New Revision: 23220
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23220
Log:
Slight robustness and behavior improvement in style change code
Modified:
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23220&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Fri Sep 27 09:19:44 2019
@@ -6662,16 +6662,14 @@
QString newUIStyle = m_prefsManager.guiStyle();
if (oldPrefs.uiPrefs.style != newUIStyle)
{
- if (newUIStyle.isEmpty())
- ScQApp->setStyle(m_prefsManager.guiSystemStyle());
+ QString styleName = m_prefsManager.guiSystemStyle();
+ if (!newUIStyle.isEmpty())
+ styleName = newUIStyle;
+ QStyle * newStyle = QStyleFactory::create(styleName);
+ if (newStyle)
+ ScQApp->setStyle(newStyle);
else
- {
- QStyle * newStyle = QStyleFactory::create(newUIStyle);
- if (newStyle)
- ScQApp->setStyle(newStyle);
- else
- m_prefsManager.appPrefs.uiPrefs.style = oldPrefs.uiPrefs.style;
- }
+ m_prefsManager.appPrefs.uiPrefs.style = oldPrefs.uiPrefs.style;
}
int newUIFontSize = m_prefsManager.guiFontSize();
if (oldPrefs.uiPrefs.applicationFontSize != newUIFontSize)
@@ -6693,8 +6691,8 @@
QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
if (!windows.isEmpty())
{
- int windowCount=windows.count();
- for ( int i = 0; i < windowCount; ++i )
+ int windowCount = windows.count();
+ for (int i = 0; i < windowCount; ++i)
{
QWidget* w = windows.at(i)->widget();
ScribusWin* scw = dynamic_cast<ScribusWin *>(w);
More information about the scribus-commit
mailing list