r17150 by fschmid - "Paste Recent" pastes now at the positon of the mouse click. Follow up: Take into account that this action can also be fired by the main menue.

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 30 10:45:18 UTC 2011


Author: fschmid
Date: Fri Dec 30 10:45:18 2011
New Revision: 17150

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17150
Log:
"Paste Recent" pastes now at the positon of the mouse click. Follow up: Take into account that this action can also be fired by the main menue.

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

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17150&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Fri Dec 30 10:45:18 2011
@@ -3386,7 +3386,10 @@
 			bool savedAlignGuides = doc->SnapGuides;
 			doc->useRaster = false;
 			doc->SnapGuides = false;
-			slotElemRead(data, view->dragX, view->dragY, true, false, doc, view);
+			if ((view->dragX == 0) && (view->dragY == 0))
+				slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), true, false, doc, view);
+			else
+				slotElemRead(data, view->dragX, view->dragY, true, false, doc, view);
 			doc->useRaster = savedAlignGrid;
 			doc->SnapGuides = savedAlignGuides;
 			Selection tmpSelection(this, false);
@@ -3404,6 +3407,8 @@
 		}
 		slotDocCh(false);
 		doc->regionsChanged()->update(QRectF());
+		view->dragX = 0;
+		view->dragY = 0;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17150&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp Fri Dec 30 10:45:18 2011
@@ -471,6 +471,8 @@
 	}
 	if (m_AP->scrRecentPasteActions.count()>0)
 	{
+		m_doc->view()->dragX = mx;
+		m_doc->view()->dragY = my;
 		QMenu* menuPasteRecent = new QMenu(this);
 		QAction *act = addMenu(menuPasteRecent);
 		act->setText( ScribusView::tr("Paste Recent"));




More information about the scribus-commit mailing list