Index: Scribus/scribus/selection.h
===================================================================
--- Scribus/scribus/selection.h	(revision 13080)
+++ Scribus/scribus/selection.h	(working copy)
@@ -141,6 +141,10 @@
 		bool isGUISelection() const { return m_isGUISelection; }
 		double width() const;
 		double height() const;
+		/* Author: OssiLehtinen
+		 * Returns the coordinates of the rectangle surrounding items in the current selection
+		 */ 
+		void getSelectionRect(double *x, double *y, double *w, double *h);
 		//set the group rectangle properties
 		void setGroupRect();
 		void getGroupRect(double *x, double *y, double *w, double *h);
Index: Scribus/scribus/selection.cpp
===================================================================
--- Scribus/scribus/selection.cpp	(revision 13080)
+++ Scribus/scribus/selection.cpp	(working copy)
@@ -355,6 +355,37 @@
 	}
 	return maxY-minY;
 }
+ 
+// Author: OssiLehtinen
+void Selection::getSelectionRect(double *x, double *y, double *w, double *h)
+{
+	if (m_SelList.isEmpty())
+	{
+		*x = 0; *y = 0; *w = 0; *h = 0;
+		return;
+	}
+	double minX=9999999.9;
+	double minY=9999999.9;
+	double maxX=-9999999.9;
+	double maxY=-9999999.9;
+	SelectionList::ConstIterator it=m_SelList.begin();
+	SelectionList::ConstIterator itend=m_SelList.end();
+	double x1=0.0,x2=0.0,y1=0.0,y2=0.0;
+	for ( ; it!=itend ; ++it)
+	{
+		(*it)->getBoundingRect(&x1, &y1, &x2, &y2);
+		if (y1<minY)
+			minY=y1;
+		if (y2>maxY)
+			maxY=y2;
+		if (x1<minX)
+			minX=x1;
+		if (x2>maxX)
+			maxX=x2;
+	}
+	*x = minX; *y = minY; *w = maxX - minX; *h = maxY - minY;
+	return;	
+}
 
 void Selection::setGroupRect()
 {
Index: Scribus/scribus/canvasmode_normal.cpp
===================================================================
--- Scribus/scribus/canvasmode_normal.cpp	(revision 13080)
+++ Scribus/scribus/canvasmode_normal.cpp	(working copy)
@@ -1024,6 +1024,15 @@
 	int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
 	QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
 //	mpo.translate(m_doc->minCanvasCoordinate.x() * m_canvas->scale(), m_doc->minCanvasCoordinate.y() * m_canvas->scale());
+
+	/* OssiLehtinen: If we have an active selection and we click in its area, 
+	the current selection will be preserved even though another item is on 
+	 a higher level at the click location. This does not apply if modifiers are pressed.*/
+	double x, y, w, h;
+	m_doc->m_Selection->getSelectionRect(&x, &y, &w, &h);
+	if(MxpS > (int)x && MxpS < (int)x + (int)w && MypS > (int)y && MypS < (int)y + (int)h && (m->modifiers() & SELECT_IN_GROUP) == 0 && (m->modifiers() & SELECT_MULTIPLE) == 0 && (m->modifiers() & SELECT_BENEATH) == 0 )
+		return true;
+
 	m_doc->nodeEdit.deselect();
 
 	if(!m_doc->guidesSettings.before) // guides are on foreground and want to be processed first
