r15007 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:38 CEST 2010


Revision: 15007
Author: jghali
Date: 2010-04-23T19:32:22.482177Z
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  /trunk/Scribus/scribus/scribusview.cpp

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 15006)
+++ scribus/scribusview.cpp	(revision 15007)
@@ -915,12 +915,12 @@
 //		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)->LayerID==Doc->activeLayer())
 			{
-//				Doc->m_Selection->delaySignalsOn();
 				if (m_canvas->frameHitTest(dropPosDocQ, Doc->Items->at(i)) >= Canvas::INSIDE)
 				{
 					Deselect(false);
@@ -929,7 +929,6 @@
 					selectedItemByDrag=true;
 					break;
 				}
-//				Doc->m_Selection->delaySignalsOff();
 			}
 		}
 		Doc->m_Selection->delaySignalsOff();




More information about the scribus-commit mailing list