r15006 by jghali - #9051: Drag and drop of image frames into an existing frame fails when there is another image frame in the background

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 23 21:40:20 CEST 2010


Revision: 15006
Author: jghali
Date: 2010-04-23T19:30:54.936929Z
Commit message: #9051: Drag and drop of image frames into an existing frame fails when there is another image frame in the background

Changeset: 
M  /branches/Version135/Scribus/scribus/scribusview.cpp

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 15005)
+++ scribus/scribusview.cpp	(revision 15006)
@@ -916,8 +916,9 @@
 //		int pscx=qRound(e->pos().x()/m_canvas->scale()), pscy=qRound(e->pos().y()/m_canvas->scale());
 		//Loop through all items and see which one(s) were under the drop point on the current layer
 		//Should make a nice function for this.
+		//#9051 :  loop in reverse order so that items in front of others are prioritized
 		Doc->m_Selection->delaySignalsOn();
-		for (int i=0; i<Doc->Items->count(); ++i)
+		for (int i = Doc->Items->count() - 1; i >= 0 ; --i)
 		{
 			if (Doc->Items->at(i)->LayerNr==Doc->activeLayer())
 			{




More information about the scribus-commit mailing list