r18872 by craig - #12115: Ensure right update method called when restoring page item deletion

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 4 22:18:30 UTC 2014


Author: craig
Date: Tue Mar  4 22:18:30 2014
New Revision: 18872

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18872
Log:
#12115: Ensure right update method called when restoring page item deletion

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

Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18872&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp (original)
+++ trunk/Scribus/scribus/scpage.cpp Tue Mar  4 22:18:30 2014
@@ -356,6 +356,7 @@
 {
 	if (!state)
 		return;
+	int stateCode = state->transactionCode;
 	QList<PageItem*> itemList = state->getItem();
 	int id = state->getInt("ITEMID");
 	int id2 = state->getInt("ID");
@@ -377,7 +378,6 @@
 			PageItem* ite = itemList.at(i);
 			m_Doc->view()->SelectItem(ite);
 		}
- 		update();
 	}
 	else
 	{
@@ -392,8 +392,10 @@
 		tmpSelection.addItem(ite);
 		m_Doc->itemSelection_DeleteItem(&tmpSelection);
 	}
+	if ((stateCode == 0) || (stateCode == 2))
+		update();
+	m_Doc->setMasterPageMode(oldMPMode);
 	m_Doc->m_Selection->delaySignalsOff();
-	m_Doc->setMasterPageMode(oldMPMode);
 }
 
 void ScPage::restorePageItemConversion(ScItemState<std::pair<PageItem*, PageItem*> >*state, bool isUndo)

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18872&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Mar  4 22:18:30 2014
@@ -3552,7 +3552,6 @@
 
 void ScribusMainWindow::rebuildScrapbookMenu()
 {
-	qDebug()<<"Clearing scrapbook menu";
 	scrMenuMgr->clearMenuStrings("ItemSendToScrapbook");
 	scrScrapActions.clear();
 	if (!HaveDoc)




More information about the scribus-commit mailing list