r18704 by fschmid - Fixed Bug #11933: Snap items is triggered by group/ungroup

scribus-commit scribus-commit at lists.scribus.net
Fri Jan 10 09:50:40 UTC 2014


Author: fschmid
Date: Fri Jan 10 09:50:39 2014
New Revision: 18704

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18704
Log:
Fixed Bug #11933: Snap items is triggered by group/ungroup

Modified:
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/scribusview.h

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18704&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Fri Jan 10 09:50:39 2014
@@ -354,6 +354,7 @@
 	endEditButton->setVisible(false);
 	connect(endEditButton, SIGNAL(clicked()), m_ScMW, SLOT(slotFileClose()));
 	editOnPreviewToolbarButton->hide();
+	m_oldSnapToElem = Doc->SnapElement;
 	languageChange();
 }
 
@@ -4400,7 +4401,10 @@
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
 		if(m->key() == Qt::Key_Shift)
+		{
+			m_oldSnapToElem = Doc->SnapElement;
 			m_ScMW->SetSnapElements(false);
+		}
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyPressEvent(m);
 		else
@@ -4411,7 +4415,7 @@
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
 		if(m->key() == Qt::Key_Shift)
-			m_ScMW->SetSnapElements(true);
+			m_ScMW->SetSnapElements(m_oldSnapToElem);
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyReleaseEvent(m);
 		else

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18704&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h (original)
+++ trunk/Scribus/scribus/scribusview.h Fri Jan 10 09:50:39 2014
@@ -330,6 +330,7 @@
 	bool _isGlobalMode;
 	bool linkAfterDraw;
 	bool ImageAfterDraw;
+	bool m_oldSnapToElem;
 
 	double oldItemX;
 	double oldItemY;




More information about the scribus-commit mailing list