r18728 by fschmid - Fixed Bug #11960: Using the new "Close" icons in tabs triggers crash

scribus-commit scribus-commit at lists.scribus.net
Wed Jan 15 16:24:10 UTC 2014


Author: fschmid
Date: Wed Jan 15 16:24:09 2014
New Revision: 18728

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18728
Log:
Fixed Bug #11960: Using the new "Close" icons in tabs triggers crash

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribuswin.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18728&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Jan 15 16:24:09 2014
@@ -381,6 +381,7 @@
 	{
 		mdiArea->setViewMode(QMdiArea::TabbedView);
 		mdiArea->setTabsClosable(true);
+		mdiArea->setDocumentMode(true);
 	}
 	else
 		mdiArea->setViewMode(QMdiArea::SubWindowView);
@@ -8027,6 +8028,7 @@
 		{
 			mdiArea->setViewMode(QMdiArea::TabbedView);
 			mdiArea->setTabsClosable(true);
+			mdiArea->setDocumentMode(true);
 		}
 		else
 			mdiArea->setViewMode(QMdiArea::SubWindowView);

Modified: trunk/Scribus/scribus/scribuswin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18728&path=/trunk/Scribus/scribus/scribuswin.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuswin.cpp (original)
+++ trunk/Scribus/scribus/scribuswin.cpp Wed Jan 15 16:24:09 2014
@@ -112,6 +112,8 @@
 
 void ScribusWin::closeEvent(QCloseEvent *ce)
 {
+	activateWindow();
+	m_MainWindow->newActWin(getSubWin());
 	if (m_Doc->symbolEditMode())
 	{
 		m_MainWindow->editSymbolEnd();
@@ -148,7 +150,7 @@
 			{
 				if (m_MainWindow->slotFileSave())
 				{
-					if (m_Doc==m_MainWindow->storyEditor->currentDocument())
+					if (m_Doc == m_MainWindow->storyEditor->currentDocument())
 						m_MainWindow->storyEditor->close();
 				}
 				else




More information about the scribus-commit mailing list