r23255 by jghali - Speedup undo deletion of multiple items by using Selection's new addItems()

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 11 11:47:31 UTC 2019


Author: jghali
Date: Fri Oct 11 11:47:31 2019
New Revision: 23255

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23255
Log:
Speedup undo deletion of multiple items by using Selection's new addItems()

Modified:
    trunk/Scribus/scribus/scpage.cpp

Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23255&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp	(original)
+++ trunk/Scribus/scribus/scpage.cpp	Fri Oct 11 11:47:31 2019
@@ -389,17 +389,13 @@
 			oldItem->Parent->asGroupFrame()->groupItemList.insert(id, oldItem);
 		else
 			m_Doc->Items->insert(id, oldItem);
-		for (int i = 0; i < itemList.count(); ++i)
-		{
-			PageItem* ite = itemList.at(i);
-			m_Doc->view()->SelectItem(ite);
-		}
+		m_Doc->m_Selection->addItems(itemList);
 	}
 	else
 	{
 		Selection tmpSelection(m_Doc, false);
 		PageItem* ite = itemList.at(id2);
-		if (m_Doc->m_Selection->findItem(ite)!=-1)
+		if (m_Doc->m_Selection->findItem(ite) != -1)
 		{
 			if (m_Doc->appMode == modeEdit || m_Doc->appMode == modeEditTable)
 				m_Doc->view()->requestMode(modeNormal);




More information about the scribus-commit mailing list