r21287 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Fri May 6 07:23:06 UTC 2016


Author: fschmid
Date: Fri May  6 07:23:06 2016
New Revision: 21287

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21287
Log:
Improvements to Bug #13978: Regression: Docked palettes position is not saved between sessions
Note you must have Qt 5.6.x for that.

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/scdockpalette.cpp
    trunk/Scribus/scribus/ui/scdockpalette.h

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21287&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Fri May  6 07:23:06 2016
@@ -6703,6 +6703,7 @@
 	marksManager->startup();
 	nsEditor->startup();
 	symbolPalette->startup();
+#if QT_VERSION < 0x050600
 	if (!m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.isEmpty())
 	{
 		for (int a = 0; a < m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.count(); a++)
@@ -6743,9 +6744,10 @@
 					break;
 			}
 		}
-		move(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.xPosition, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.yPosition);
-		resize(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.width, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.height);
-	}
+	}
+#endif
+	move(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.xPosition, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.yPosition);
+	resize(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.width, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.height);
 
 	// init the toolbars
 	fileToolBar->initVisibility();

Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21287&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp	Fri May  6 07:23:06 2016
@@ -93,6 +93,7 @@
 	setFontSize();
 	if (visibleOnStartup)
 	{
+#if QT_VERSION < 0x050600
 		QMainWindow* mainWindow = dynamic_cast<QMainWindow*>(parent());
 		if (palettePrefs && mainWindow)
 		{
@@ -105,6 +106,7 @@
 				setFloating (palettePrefs->getBool("floating"));
 			}
 		}
+#endif
 		show();
 	}
 	else
@@ -139,15 +141,17 @@
 	hide();
 }
 
-void ScDockPalette::hideEvent(QHideEvent*)
+void ScDockPalette::hideEvent(QHideEvent* hideEvent)
 {
 	storePosition();
 	storeSize();
 	storeDockState();
+	QDockWidget::hideEvent(hideEvent);
 }
 
 void ScDockPalette::showEvent(QShowEvent *showEvent)
 {
+#if QT_VERSION < 0x050600
 	// According to Qt doc, non-spontaneous show events are sent to widgets
 	// immediately before they are shown. We want to restore geometry for those
 	// events as spontaneous events are delivered after dialog has been shown
@@ -198,6 +202,7 @@
 		storeDockState();
 		storeVisibility(true);
 	}
+#endif
 	QDockWidget::showEvent(showEvent);
 }
 

Modified: trunk/Scribus/scribus/ui/scdockpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21287&path=/trunk/Scribus/scribus/ui/scdockpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.h	(original)
+++ trunk/Scribus/scribus/ui/scdockpalette.h	Fri May  6 07:23:06 2016
@@ -69,7 +69,7 @@
 		/** @brief Captures the close event and changes it to hide */
 		virtual void closeEvent(QCloseEvent *closeEvent);
 		/** @brief Stores the geometry of the window when hiding. */
-		virtual void hideEvent(QHideEvent*);
+		virtual void hideEvent(QHideEvent* hideEvent);
 		
 		PrefsContext* palettePrefs;
 		QString prefsContextName;




More information about the scribus-commit mailing list