r21831 by craig - #14678: Add Paste Here to context menu even when there would be a selection

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 16 22:09:35 UTC 2017


Author: craig
Date: Thu Mar 16 22:09:35 2017
New Revision: 21831

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21831
Log:
#14678: Add Paste Here to context menu even when there would be a selection

Modified:
    trunk/Scribus/scribus/ui/contextmenu.cpp

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21831&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp	(original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp	Thu Mar 16 22:09:35 2017
@@ -24,6 +24,7 @@
 #include <QWidgetAction>
 
 #include "appmodes.h"
+#include "canvas.h"
 #include "canvasmode.h"
 #include "pageitem_textframe.h"
 #include "scmimedata.h"
@@ -499,6 +500,19 @@
 		menuEdit->addAction(m_ScMW->scrActions["editPaste"]);
 	if (!currItem->locked() && (m_doc->appMode != modeEdit)  && (m_doc->appMode != modeEditTable) && (!(currItem->isSingleSel)))
 		menuEdit->addAction(m_ScMW->scrActions["itemDelete"]);
+
+//<<#14678
+	if (ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment() )
+	{
+		FPoint fp = m_doc->view()->m_canvas->globalToCanvas(QCursor::pos());
+		m_doc->view()->dragX = fp.x();
+		m_doc->view()->dragY = fp.y();
+		menuEdit->addAction( tr("&Paste Here") , m_doc->view(), SLOT(PasteToPage()));
+	}
+//>>#14678
+
+
+
 	//-->
 	//<-- Add undo
 	UndoManager * const undoManager(UndoManager::instance());




More information about the scribus-commit mailing list