r17332 by fschmid - Connect the handleCellSelection slot only when a table item is selected.

scribus-commit scribus-commit at lists.scribus.net
Fri Feb 24 20:08:39 UTC 2012


Author: fschmid
Date: Fri Feb 24 20:08:39 2012
New Revision: 17332

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17332
Log:
Connect the handleCellSelection slot only when a table item is selected.

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

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17332&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp Fri Feb 24 20:08:39 2012
@@ -70,12 +70,13 @@
 void PropertiesPalette_Table::setItem(PageItem* item)
 {
 	m_item = item;
-	connect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleCellSelectionChanged()));
+	if (item->isTable())
+		connect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleCellSelectionChanged()));
 }
 
 void PropertiesPalette_Table::unsetItem()
 {
-	if (m_item)
+	if ((m_item) && (m_item->isTable()))
 		disconnect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleCellSelectionChanged()));
 	m_item = 0;
 }




More information about the scribus-commit mailing list