r18754 by jghali - Additional fix for #11997: calling propertiesPalette->unsetItem() from ScribusMainWindow::editInlineEnd() is not necessary if one fix the real cause of the issue, ie property widget for table not being correctly informed about selection changes

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 19 21:04:18 UTC 2014


Author: jghali
Date: Sun Jan 19 21:04:18 2014
New Revision: 18754

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18754
Log:
Additional fix for #11997: calling propertiesPalette->unsetItem() from ScribusMainWindow::editInlineEnd() is not necessary if one fix the real cause of the issue, ie property widget for table not being correctly informed about selection changes

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/propertiespalette_table.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18754&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Jan 19 21:04:18 2014
@@ -9008,7 +9008,6 @@
 	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
 	view->setScale(storedViewScale);
 	view->hideInlinePage();
-	propertiesPalette->unsetItem();
 	if (m_WasAutoSave)
 	{
 		doc->setAutoSave(true);

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18754&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp Sun Jan 19 21:04:18 2014
@@ -69,14 +69,31 @@
 
 void PropertiesPalette_Table::setDocument(ScribusDoc *doc)
 {
+	if (m_doc)
+	{
+		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+	}
+
 	m_doc = doc;
+
 	tableStyleCombo->setDoc(m_doc);
 	cellStyleCombo->setDoc(m_doc);
+
+	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
 }
 
 void PropertiesPalette_Table::unsetDocument()
 {
+	if (m_doc)
+	{
+		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+	}
+
 	m_doc = 0;
+
 	tableStyleCombo->setDoc(m_doc);
 	cellStyleCombo->setDoc(m_doc);
 }




More information about the scribus-commit mailing list