r14700 by jghali - better fix for #8786

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 13 02:20:22 CET 2010


Revision: 14700
Author: jghali
Date: 2010-02-13T01:18:20.844596Z
Commit message: better fix for #8786

Changeset: 
M  /branches/Version135/Scribus/scribus/canvasgesture_resize.cpp
M  /branches/Version135/Scribus/scribus/canvasgesture_resize.h

Diffs:
Index: scribus/canvasgesture_resize.h
===================================================================
--- scribus/canvasgesture_resize.h	(revision 14699)
+++ scribus/canvasgesture_resize.h	(revision 14700)
@@ -78,6 +78,7 @@
 	QPoint m_mousePressPoint;
 	QRectF m_bounds;
 	QRectF m_origBounds;
+	QRectF m_mousePressBounds;
 	UndoTransaction* m_transactionStarted;
 	double m_extraWidth;
 	double m_extraHeight;
Index: scribus/canvasgesture_resize.cpp
===================================================================
--- scribus/canvasgesture_resize.cpp	(revision 14699)
+++ scribus/canvasgesture_resize.cpp	(revision 14700)
@@ -143,7 +143,7 @@
 	{
 		PageItem* currItem = m_doc->m_Selection->itemAt(0);
 //		qDebug() << "ResizeGesture::release: new bounds" << m_bounds;
-		if (m_bounds != m_origBounds)
+		if (m_bounds != m_mousePressBounds)
 		{
 			doResize(m->modifiers() & Qt::AltModifier);
 			m_doc->setRedrawBounding(currItem);
@@ -153,7 +153,7 @@
 		m_view->resetMousePressed();
 		// necessary since mousebutton is still recorded pressed, and otherwise checkchanges() will do nothing
 		// we must check changes on whole selection otherwise resize operation won't undo correctly on groups
-		if (m_bounds != m_origBounds)
+		if (m_bounds != m_mousePressBounds)
 		{
 			for (int i = 0; i < m_doc->m_Selection->count(); ++i)
 				m_doc->m_Selection->itemAt(i)->checkChanges();
@@ -327,7 +327,7 @@
 
 	if (m_mousePressPoint == m->globalPos())
 	{
-		m_bounds = m_origBounds;
+		m_bounds = m_mousePressBounds;
 		return;
 	}
 
@@ -551,5 +551,6 @@
 	{
 		prepare(m_handle);
 		m->accept();
+		m_mousePressBounds = m_bounds;
 	}
 }




More information about the scribus-commit mailing list