View Issue Details

IDProjectCategoryView StatusLast Update
0015229ScribusInternalpublic2019-06-04 20:56
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.4.svn 
Target VersionFixed in Version1.5.4.svn 
Summary0015229: remove m_oldSnapToElem from scribusview.h
Descriptionremove m_oldSnapToElem from scribusview.h, since it's only referenced in commented out code.

after applying the patch, m_oldSnapToElem cannot be found in the whole project.
TagsNo tags attached.
PatchYes

Activities

ale

2018-03-29 11:39

manager  

no_oldsnaptoelem.diff (1,598 bytes)
diff --git a/scribus/scribusview.cpp b/scribus/scribusview.cpp
index 9e9ce2b81..a13a93ecd 100644
--- a/scribus/scribusview.cpp
+++ b/scribus/scribusview.cpp
@@ -230,6 +230,7 @@ ScribusView::ScribusView(QWidget* win, ScribusMainWindow* mw, ScribusDoc *doc) :
 	endEditButton->setVisible(false);
 	connect(endEditButton, SIGNAL(clicked()), m_ScMW, SLOT(slotEndSpecialEdit()));
 
+	m_oldSnapToElem = Doc->SnapElement;
 	languageChange();
 }
 
@@ -3581,6 +3582,13 @@ bool ScribusView::eventFilter(QObject *obj, QEvent *event)
 	else if (event->type() == QEvent::KeyPress)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
+		/* #12453... what do we use this for?
+		 if(m->key() == Qt::Key_Shift)
+		{
+			m_oldSnapToElem = Doc->SnapElement;
+			m_ScMW->SetSnapElements(false);
+		}
+		*/
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyPressEvent(m);
 		else
@@ -3590,6 +3598,10 @@ bool ScribusView::eventFilter(QObject *obj, QEvent *event)
 	else if (event->type() == QEvent::KeyRelease)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
+		/* #12453... what do we use this for?
+		if(m->key() == Qt::Key_Shift)
+			m_ScMW->SetSnapElements(m_oldSnapToElem);
+		*/
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyReleaseEvent(m);
 		else
diff --git a/scribus/scribusview.h b/scribus/scribusview.h
index ca980243a..11c2138eb 100644
--- a/scribus/scribusview.h
+++ b/scribus/scribusview.h
@@ -277,6 +277,7 @@ private: // Private attributes
 	bool _isGlobalMode;
 	bool linkAfterDraw;
 	bool ImageAfterDraw;
+	bool m_oldSnapToElem;
 
 private slots:
 	void setZoom();
no_oldsnaptoelem.diff (1,598 bytes)

ale

2018-03-29 12:14

manager   ~0045119

ooops... i've uploaded the inverted diff...

i hope that replacing the + by - is enough...
(i've deleted the branch and i cannot just redo the diff...)

no_oldsnaptoelem-2.diff (1,598 bytes)
diff --git a/scribus/scribusview.cpp b/scribus/scribusview.cpp
index 9e9ce2b81..a13a93ecd 100644
--- a/scribus/scribusview.cpp
+++ b/scribus/scribusview.cpp
@@ -230,6 +230,7 @@ ScribusView::ScribusView(QWidget* win, ScribusMainWindow* mw, ScribusDoc *doc) :
 	endEditButton->setVisible(false);
 	connect(endEditButton, SIGNAL(clicked()), m_ScMW, SLOT(slotEndSpecialEdit()));
 
-	m_oldSnapToElem = Doc->SnapElement;
 	languageChange();
 }
 
@@ -3581,6 +3582,13 @@ bool ScribusView::eventFilter(QObject *obj, QEvent *event)
 	else if (event->type() == QEvent::KeyPress)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
-		/* #12453... what do we use this for?
-		 if(m->key() == Qt::Key_Shift)
-		{
-			m_oldSnapToElem = Doc->SnapElement;
-			m_ScMW->SetSnapElements(false);
-		}
-		*/
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyPressEvent(m);
 		else
@@ -3590,6 +3598,10 @@ bool ScribusView::eventFilter(QObject *obj, QEvent *event)
 	else if (event->type() == QEvent::KeyRelease)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
-		/* #12453... what do we use this for?
-		if(m->key() == Qt::Key_Shift)
-			m_ScMW->SetSnapElements(m_oldSnapToElem);
-		*/
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyReleaseEvent(m);
 		else
diff --git a/scribus/scribusview.h b/scribus/scribusview.h
index ca980243a..11c2138eb 100644
--- a/scribus/scribusview.h
+++ b/scribus/scribusview.h
@@ -277,6 +277,7 @@ private: // Private attributes
 	bool _isGlobalMode;
 	bool linkAfterDraw;
 	bool ImageAfterDraw;
-	bool m_oldSnapToElem;
 
 private slots:
 	void setZoom();
no_oldsnaptoelem-2.diff (1,598 bytes)

Issue History

Date Modified Username Field Change
2018-03-29 11:39 ale New Issue
2018-03-29 11:39 ale File Added: no_oldsnaptoelem.diff
2018-03-29 11:39 ale Summary remove m_oldSnapToElem from scribusview.h => [PATCH] remove m_oldSnapToElem from scribusview.h
2018-03-29 11:39 ale Patch No => Yes
2018-03-29 12:14 ale File Added: no_oldsnaptoelem-2.diff
2018-03-29 12:14 ale Note Added: 0045119
2018-03-30 05:23 jghali Category - => General
2018-03-30 05:23 jghali Product Version 1.5.4 => 1.5.4.svn
2018-03-30 08:18 jghali Category General => Internal
2018-03-30 08:18 jghali Summary [PATCH] remove m_oldSnapToElem from scribusview.h => remove m_oldSnapToElem from scribusview.h
2018-03-30 08:18 jghali Assigned To => ale
2018-03-30 08:18 jghali Status new => resolved
2018-03-30 08:18 jghali Resolution open => fixed
2018-03-30 08:18 jghali Fixed in Version => 1.5.4.svn
2019-06-04 20:56 cbradney Status resolved => closed