r14255 by jghali - #7933, switching between text frames non-intuitive : keep text edit mode when clicking in another text frame while in edit mode

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 3 00:25:19 CET 2009


Revision: 14255
Author: jghali
Date: 2009-11-02T18:24:09.781242Z
Commit message: #7933, switching between text frames non-intuitive : keep text edit mode when clicking in another text frame while in edit mode

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

Diffs:
Index: scribus/canvasmode_edit.cpp
===================================================================
--- scribus/canvasmode_edit.cpp	(revision 14254)
+++ scribus/canvasmode_edit.cpp	(revision 14255)
@@ -969,25 +969,30 @@
 			else if (resizeGesture->frameHandle() < 0)
 			{
 				m_view->Deselect(true);
+				bool wantNormal = true;
 				if (SeleItem(m))
 				{
 					currItem = m_doc->m_Selection->itemAt(0);
 					if ((currItem->asTextFrame()) || (currItem->asImageFrame()))
 					{
 						m_view->requestMode(modeEdit);
+						wantNormal = false;
 					}
 					else
 					{
 						m_view->requestMode(submodePaintingDone);
 						qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 					}
+					if (currItem->asTextFrame())
+						m_view->slotSetCurs(m->globalPos().x(), m->globalPos().y());
 				}
 				else
 				{
 					m_view->requestMode(submodePaintingDone);
 					qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 				}
-				m_view->requestMode(modeNormal);
+				if (wantNormal)
+					m_view->requestMode(modeNormal);
 				return;
 			}
 		}




More information about the scribus-commit mailing list