r21299 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat May 7 22:16:13 UTC 2016


Author: jghali
Date: Sat May  7 22:16:13 2016
New Revision: 21299

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21299
Log:
#14002: Shortcut CTRL-D delete two characters instead of one in Story Editor

Modified:
    branches/Version14x/Scribus/scribus/storyeditor.cpp

Modified: branches/Version14x/Scribus/scribus/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21299&path=/branches/Version14x/Scribus/scribus/storyeditor.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/storyeditor.cpp	(original)
+++ branches/Version14x/Scribus/scribus/storyeditor.cpp	Sat May  7 22:16:13 2016
@@ -351,33 +351,34 @@
 		(k->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier | Qt::KeypadModifier))
 	   )
 	{
+		bool processed = false;
 		switch (k->key())
 		{
 			case Qt::Key_K:
 				moveCursor(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
 				textCursor().removeSelectedText();
+				processed = true;
 				break;
 			case Qt::Key_D:
 				moveCursor(QTextCursor::NextCharacter, QTextCursor::KeepAnchor);
 				textCursor().removeSelectedText();
+				processed = true;
 				break;
 			case Qt::Key_H:
 				moveCursor(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);
 				textCursor().removeSelectedText();
+				processed = true;
 				break;
-			/*case Qt::Key_X:
-				cut();
-				return;
-				break;
-			case Qt::Key_V:
-				paste();
-				return;
-				break;*/
 			case Qt::Key_Y:
 			case Qt::Key_Z:
 				emit SideBarUp(true);
 				return;
-				break;
+		}
+		if (processed)
+		{
+			emit SideBarUp(true);
+			emit SideBarUpdate();
+			return;
 		}
 	}
 	if ((k->modifiers() == Qt::NoModifier) ||




More information about the scribus-commit mailing list