r14941 by jghali - #5276: shortcut error in story editor (Shift+Enter)

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 27 16:10:23 CET 2010


Revision: 14941
Author: jghali
Date: 2010-03-27T15:06:18.312940Z
Commit message: #5276: shortcut error in story editor (Shift+Enter)

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

Diffs:
Index: scribus/storyeditor.cpp
===================================================================
--- scribus/storyeditor.cpp	(revision 14940)
+++ scribus/storyeditor.cpp	(revision 14941)
@@ -405,7 +405,14 @@
 			case Qt::Key_Return:
 			case Qt::Key_Enter:
 				{
-					insertChars(SpecialChars::PARSEP, k->text());
+					bool insLineBreak = (k->modifiers() == Qt::ShiftModifier);
+					QString txtString = insLineBreak ? SpecialChars::LINEBREAK : SpecialChars::PARSEP;
+					QString guiString = insLineBreak ? QString("*") : k->text();
+					if (insLineBreak)
+						setColor(true);
+					insertChars(txtString, guiString);
+					if (insLineBreak)
+						setColor(false);
 					emit SideBarUp(true);
 					emit SideBarUpdate();
 					return;




More information about the scribus-commit mailing list