r20478 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 20 19:31:56 UTC 2015


Author: jghali
Date: Tue Oct 20 19:31:56 2015
New Revision: 20478

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20478
Log:
#11526: DELETE key in "Edit Image" mode should empty image frame <Mazoon>

Modified:
    trunk/Scribus/scribus/pageitem_imageframe.cpp

Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20478&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp	Tue Oct 20 19:31:56 2015
@@ -29,6 +29,10 @@
 #include <cmath>
 #include <cassert>
 
+#include "scconfig.h"
+
+#include "appmodes.h"
+#include "commonstrings.h"
 #include "filewatcher.h"
 #include "pageitem.h"
 #include "pageitem_imageframe.h"
@@ -37,17 +41,15 @@
 #include "scpage.h"
 #include "scpaths.h"
 #include "scpainter.h"
-
 #include "scribusstructs.h"
 #include "scribuscore.h"
 #include "scribusdoc.h"
-#include "commonstrings.h"
+#include "scribusview.h"
+
 #include "undomanager.h"
 #include "undostate.h"
-#include "scconfig.h"
 #include "util_formats.h"
 #include "util_color.h"
-
 #include "util.h"
 
 
@@ -269,9 +271,18 @@
 		moveBy=0.01;
 	else if (!shiftDown && altDown)
 		resizingImage=true;
+
 	double dX=0.0,dY=0.0;
 	int kk = k->key();
-	if (!resizingImage)
+	ScribusView* view = m_Doc->view();
+
+	if (kk == Qt::Key_Delete || kk == Qt::Key_Backspace || (shiftDown && controlDown && kk == Qt::Key_Delete) )	// Delete in edit mode, to empty the frame
+	{
+		clearContents();
+		view->requestMode(modeNormal);
+		update();
+	}
+	else if (!resizingImage)
 	{
 		moveBy/=m_Doc->unitRatio();//Lets allow movement by the current doc ratio, not only points
 		switch (kk)




More information about the scribus-commit mailing list