r14148 by jghali - #8512: crash when changing document bleed values

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 12 21:00:37 CEST 2009


Revision: 14148
Author: jghali
Date: 2009-10-12T17:45:35.075425Z
Commit message: #8512: crash when changing document bleed values

Changeset: 
M  /trunk/Scribus/scribus/pageitem.cpp

Diffs:
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(revision 14147)
+++ scribus/pageitem.cpp	(revision 14148)
@@ -2808,16 +2808,17 @@
 	if(!m_Doc->isLoading())
 	{
 		QRectF baseRect(getBoundingRect());
-		for(int idx = (allItems ? m_Doc->Items->count()-1 : ItemNr-1); idx >= 0 ; --idx)
+		QList<PageItem*>* items = OnMasterPage.isEmpty() ? &m_Doc->DocItems : &m_Doc->MasterItems;
+		for(int idx = (allItems ? items->count()-1 : ItemNr-1); idx >= 0 ; --idx)
 		{
 			if(idx != static_cast<int>(ItemNr)) // avoids itself
 			{
-				if(m_Doc->Items->at(idx)->asTextFrame()) // do not bother with no text frames
+				if(items->at(idx)->asTextFrame()) // do not bother with no text frames
 				{
-					QRectF uRect(m_Doc->Items->at(idx)->getBoundingRect());
+					QRectF uRect(items->at(idx)->getBoundingRect());
 					if(baseRect.intersects(uRect))
 					{
-						m_Doc->Items->at(idx)->update();
+						items->at(idx)->update();
 					}
 				}
 			}




More information about the scribus-commit mailing list