r18027 by jghali - rename ScribusDoc's useRaster member to the more understandable SnapGrid (at least for non German speakers)

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 31 20:54:39 UTC 2012


Author: jghali
Date: Mon Dec 31 20:54:39 2012
New Revision: 18027

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18027
Log:
rename ScribusDoc's useRaster member to the more understandable SnapGrid (at least for non German speakers) 

Modified:
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/canvasgesture_linemove.cpp
    trunk/Scribus/scribus/canvasmode.cpp
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/paintmanager.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Mon Dec 31 20:54:39 2012
@@ -726,7 +726,7 @@
 	connect( (*scrActions)["viewShowFrames"], SIGNAL(triggered()), mainWindow, SLOT(ToggleFrames()) );
 	connect( (*scrActions)["viewShowLayerMarkers"], SIGNAL(triggered()), mainWindow, SLOT(ToggleLayerMarkers()) );
 	connect( (*scrActions)["viewShowImages"], SIGNAL(triggered()), mainWindow, SLOT(TogglePics()) );
-	connect( (*scrActions)["viewShowGrid"], SIGNAL(triggered()), mainWindow, SLOT(ToggleRaster()) );
+	connect( (*scrActions)["viewShowGrid"], SIGNAL(triggered()), mainWindow, SLOT(ToggleGrid()) );
 	connect( (*scrActions)["viewShowGuides"], SIGNAL(triggered()), mainWindow, SLOT(ToggleGuides()) );
 	connect( (*scrActions)["viewShowColumnBorders"], SIGNAL(triggered()), mainWindow, SLOT(ToggleColumnBorders()) );
 	connect( (*scrActions)["viewShowBaseline"], SIGNAL(triggered()), mainWindow, SLOT(ToggleBase()) );
@@ -734,7 +734,7 @@
 	connect( (*scrActions)["viewShowTextControls"], SIGNAL(triggered()), mainWindow, SLOT(ToggleTextControls()) );
 	connect( (*scrActions)["viewShowRulers"], SIGNAL(triggered()), mainWindow, SLOT(ToggleRulers()) );
 	connect( (*scrActions)["viewRulerMode"], SIGNAL(triggered()), mainWindow, SLOT(ToggleRulerMode()) );
-	connect( (*scrActions)["viewSnapToGrid"], SIGNAL(triggered()), mainWindow, SLOT(ToggleURaster()) );
+	connect( (*scrActions)["viewSnapToGrid"], SIGNAL(triggered()), mainWindow, SLOT(ToggleUGrid()) );
 	connect( (*scrActions)["viewSnapToGuides"], SIGNAL(triggered()), mainWindow, SLOT(ToggleUGuides()) );
 	connect( (*scrActions)["viewSnapToElements"], SIGNAL(triggered()), mainWindow, SLOT(ToggleUElements()) );
 	connect( (*scrActions)["showMouseCoordinates"], SIGNAL(triggered()), mainWindow, SLOT(ToggleMouseTips()) );

Modified: trunk/Scribus/scribus/canvasgesture_linemove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasgesture_linemove.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_linemove.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_linemove.cpp Mon Dec 31 20:54:39 2012
@@ -208,7 +208,7 @@
 	double newX = mousePointDoc.x();
 	double newY = mousePointDoc.y();
 	
-	if (m_doc->useRaster)
+	if (m_doc->SnapGrid)
 	{
 		newX = qRound(newX / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;
 		newY = qRound(newY / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;

Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Mon Dec 31 20:54:39 2012
@@ -1398,9 +1398,9 @@
 						/* as the user might be trying to fine tune a position */
 							bool sav1 = m_doc->SnapGuides;
 							bool sav3 = m_doc->SnapElement;
-							bool sav2 = m_doc->useRaster;
+							bool sav2 = m_doc->SnapGrid;
 							m_doc->SnapGuides = false;
-							m_doc->useRaster = false;
+							m_doc->SnapGrid   = false;
 							m_doc->SnapElement = false;
 							if (m_doc->m_Selection->count() > 1)
 								m_view->startGroupTransaction(Um::Move, "", Um::IMove);
@@ -1409,7 +1409,7 @@
 								m_view->endGroupTransaction();
 							m_doc->SnapElement = sav3;
 							m_doc->SnapGuides = sav1;
-							m_doc->useRaster = sav2;
+							m_doc->SnapGrid = sav2;
 						}
 					}
 					else
@@ -1471,10 +1471,10 @@
 						/* Don't use Grid or Guide Snapping when dragging Items or Groups with the keyboard */
 						/* as the user might be trying to fine tune a position */
 							bool sav1 = m_doc->SnapGuides;
-							bool sav2 = m_doc->useRaster;
+							bool sav2 = m_doc->SnapGrid;
 							bool sav3 = m_doc->SnapElement;
 							m_doc->SnapGuides = false;
-							m_doc->useRaster = false;
+							m_doc->SnapGrid = false;
 							m_doc->SnapElement = false;
 							if (m_doc->m_Selection->count() > 1)
 								m_view->startGroupTransaction(Um::Move, "", Um::IMove);
@@ -1482,7 +1482,7 @@
 							if (m_doc->m_Selection->count() > 1)
 								m_view->endGroupTransaction();
 							m_doc->SnapGuides = sav1;
-							m_doc->useRaster = sav2;
+							m_doc->SnapGrid = sav2;
 							m_doc->SnapElement = sav3;
 						}
 					}
@@ -1545,10 +1545,10 @@
 						/* Don't use Grid or Guide Snapping when dragging Items or Groups with the keyboard */
 						/* as the user might be trying to fine tune a position */
 							bool sav1 = m_doc->SnapGuides;
-							bool sav2 = m_doc->useRaster;
+							bool sav2 = m_doc->SnapGrid;
 							bool sav3 = m_doc->SnapElement;
 							m_doc->SnapGuides = false;
-							m_doc->useRaster = false;
+							m_doc->SnapGrid = false;
 							m_doc->SnapElement = false;
 							if (m_doc->m_Selection->count() > 1)
 								m_view->startGroupTransaction(Um::Move, "", Um::IMove);
@@ -1556,7 +1556,7 @@
 							if (m_doc->m_Selection->count() > 1)
 								m_view->endGroupTransaction();
 							m_doc->SnapGuides = sav1;
-							m_doc->useRaster = sav2;
+							m_doc->SnapGrid = sav2;
 							m_doc->SnapElement = sav3;
 						}
 					}
@@ -1619,10 +1619,10 @@
 						/* Don't use Grid or Guide Snapping when dragging Items or Groups with the keyboard */
 						/* as the user might be trying to fine tune a position */
 							bool sav1 = m_doc->SnapGuides;
-							bool sav2 = m_doc->useRaster;
+							bool sav2 = m_doc->SnapGrid;
 							bool sav3 = m_doc->SnapElement;
 							m_doc->SnapGuides = false;
-							m_doc->useRaster = false;
+							m_doc->SnapGrid = false;
 							m_doc->SnapElement = false;
 							if (m_doc->m_Selection->count() > 1)
 								m_view->startGroupTransaction(Um::Move, "", Um::IMove);
@@ -1630,7 +1630,7 @@
 							if (m_doc->m_Selection->count() > 1)
 								m_view->endGroupTransaction();
 							m_doc->SnapGuides = sav1;
-							m_doc->useRaster = sav2;
+							m_doc->SnapGrid = sav2;
 							m_doc->SnapElement = sav3;
 						}
 					}

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp Mon Dec 31 20:54:39 2012
@@ -274,7 +274,7 @@
 			newY = mousePointDoc.y();
 			if (createObjectMode == modeDrawLine)
 			{
-				if (m_doc->useRaster)
+				if (m_doc->SnapGrid)
 				{
 					newX = qRound(newX / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;
 					newY = qRound(newY / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp Mon Dec 31 20:54:39 2012
@@ -205,7 +205,7 @@
 			
 			if (m_doc->appMode == modeDrawBezierLine)
 			{
-				if ((m_doc->useRaster) && (m_doc->OnPage(currItem) != -1))
+				if ((m_doc->SnapGrid) && (m_doc->OnPage(currItem) != -1))
 				{
 					newX = qRound(newX / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;
 					newY = qRound(newY / m_doc->guidesPrefs().minorGridSpacing) * m_doc->guidesPrefs().minorGridSpacing;

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Mon Dec 31 20:54:39 2012
@@ -758,7 +758,7 @@
 			else
 			{
 				currItem = m_doc->m_Selection->itemAt(0);
-				if (m_doc->useRaster)
+				if (m_doc->SnapGrid)
 				{
 					double nx = currItem->xPos();
 					double ny = currItem->yPos();

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Mon Dec 31 20:54:39 2012
@@ -611,7 +611,7 @@
 									xSnap = nx;
 							}
 						}
-						if (m_doc->useRaster)
+						if (m_doc->SnapGrid)
 						{
 							m_doc->m_Selection->setGroupRect();
 							double gx, gy, gh, gw, gxo, gyo;
@@ -697,7 +697,7 @@
 								xSnap = nx;
 						}
 					}
-					if (m_doc->useRaster)
+					if (m_doc->SnapGrid)
 					{
 						double gx, gy, gh, gw, gxo, gyo;
 						m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
@@ -1124,7 +1124,7 @@
 			{
 				currItem = m_doc->m_Selection->itemAt(0);
 				m_doc->MoveItem(m_objectDeltaPos.x(), m_objectDeltaPos.y(), currItem);
-				if (m_doc->useRaster)
+				if (m_doc->SnapGrid)
 				{
 					double nx = currItem->xPos();
 					double ny = currItem->yPos();
@@ -1842,11 +1842,11 @@
 		PrefsManager::instance()->prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
 		m_doc->setLoading(true);
 		QFileInfo fi(fileName);
-		bool savedAlignGrid = m_doc->useRaster;
+		bool savedAlignGrid = m_doc->SnapGrid;
 		bool savedAlignGuides = m_doc->SnapGuides;
 		bool savedAlignElement = m_doc->SnapElement;
 		m_doc->SnapElement = false;
-		m_doc->useRaster = false;
+		m_doc->SnapGrid = false;
 		m_doc->SnapGuides = false;
 		if (fi.suffix().toLower() == "sce")
 			m_ScMW->slotElemRead(fileName, pastePoint.x(), pastePoint.y(), true, false, m_doc, m_doc->view());
@@ -1878,7 +1878,7 @@
 			PageItem *currItem = m_doc->m_Selection->itemAt(a);
 			currItem->LayerID = m_doc->activeLayer();
 		}
-		m_doc->useRaster = savedAlignGrid;
+		m_doc->SnapGrid = savedAlignGrid;
 		m_doc->SnapGuides = savedAlignGuides;
 		m_doc->SnapElement = savedAlignElement;
 		m_doc->setLoading(false);

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Mon Dec 31 20:54:39 2012
@@ -4789,12 +4789,12 @@
 
 void PageItem::restore(UndoState *state, bool isUndo)
 {
-	bool useRasterBackup = m_Doc->useRaster;
+	bool SnapGridBackup = m_Doc->SnapGrid;
 	bool SnapGuidesBackup = m_Doc->SnapGuides;
 	bool SnapElementBackup = m_Doc->SnapElement;
 	int dummy = 0;
 	m_Doc->SnapElement = false;
-	m_Doc->useRaster = false;
+	m_Doc->SnapGrid = false;
 	m_Doc->SnapGuides = false;
 	SimpleState *ss = dynamic_cast<SimpleState*>(state);
 	bool oldMPMode=m_Doc->masterPageMode();
@@ -5031,7 +5031,7 @@
 		m_Doc->setCurrentPage(oldCurrentPage);
 	m_Doc->setMasterPageMode(oldMPMode);
 	m_Doc->SnapElement = SnapElementBackup;
-	m_Doc->useRaster = useRasterBackup;
+	m_Doc->SnapGrid = SnapGridBackup;
 	m_Doc->SnapGuides = SnapGuidesBackup;
 }
 

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Mon Dec 31 20:54:39 2012
@@ -876,7 +876,7 @@
 		m_Doc->setHyphAutoCheck(static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt()));
 		m_Doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
 		m_Doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
-		m_Doc->useRaster = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
+		m_Doc->SnapGrid  = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
 		m_Doc->guidesPrefs().minorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MINGRID"), prefsManager->appPrefs.guidesPrefs.minorGridSpacing);
 		m_Doc->guidesPrefs().majorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MAJGRID"), prefsManager->appPrefs.guidesPrefs.majorGridSpacing);
 		m_Doc->itemToolPrefs().lineStartArrow = 0;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Mon Dec 31 20:54:39 2012
@@ -857,7 +857,7 @@
 	m_Doc->rulerXoffset = attrs.valueAsDouble("rulerXoffset", 0.0);
 	m_Doc->rulerYoffset = attrs.valueAsDouble("rulerYoffset", 0.0);
 	m_Doc->SnapGuides   = attrs.valueAsBool("SnapToGuides", false);
-	m_Doc->useRaster    = attrs.valueAsBool("SnapToGrid", false);
+	m_Doc->SnapGrid     = attrs.valueAsBool("SnapToGrid", false);
 	
 	m_Doc->setAutoSave(attrs.valueAsBool("AutoSave", false));
 	m_Doc->setAutoSaveTime(attrs.valueAsInt("AutoSaveTime", 600000));
@@ -2067,9 +2067,9 @@
 	pat.yoffset = attrs.valueAsDouble("yoffset", 0.0);
 	
 	uint itemCount1 = m_Doc->Items->count();
-	bool savedAlignGrid = m_Doc->useRaster;
+	bool savedAlignGrid = m_Doc->SnapGrid;
 	bool savedAlignGuides = m_Doc->SnapGuides;
-	m_Doc->useRaster = false;
+	m_Doc->SnapGrid  = false;
 	m_Doc->SnapGuides = false;
 
 	QStringRef tagName = reader.name();
@@ -2120,7 +2120,7 @@
 		}
 	}
 
-	doc->useRaster  = savedAlignGrid;
+	doc->SnapGrid   = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	if (!success)
 	{

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Mon Dec 31 20:54:39 2012
@@ -154,7 +154,7 @@
 	docu.writeAttribute("AUTOCHECK", static_cast<int>(m_Doc->hyphAutoCheck()));
 	docu.writeAttribute("GUIDELOCK", static_cast<int>(m_Doc->GuideLock));
 	docu.writeAttribute("SnapToGuides", static_cast<int>(m_Doc->SnapGuides));
-	docu.writeAttribute("SnapToGrid", static_cast<int>(m_Doc->useRaster));
+	docu.writeAttribute("SnapToGrid", static_cast<int>(m_Doc->SnapGrid));
 	docu.writeAttribute("MINGRID", m_Doc->guidesPrefs().minorGridSpacing);
 	docu.writeAttribute("MAJGRID", m_Doc->guidesPrefs().majorGridSpacing);
 	docu.writeAttribute("SHOWGRID", static_cast<int>(m_Doc->guidesPrefs().gridShown));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Mon Dec 31 20:54:39 2012
@@ -365,7 +365,7 @@
 		m_Doc->rulerXoffset = ScCLocale::toDoubleC(dc.attribute("rulerXoffset"), 0.0);
 		m_Doc->rulerYoffset = ScCLocale::toDoubleC(dc.attribute("rulerYoffset"), 0.0);
 		m_Doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
-		m_Doc->useRaster = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
+		m_Doc->SnapGrid  = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
 		m_Doc->itemToolPrefs().polyCorners = dc.attribute("POLYC", "4").toInt();
 		m_Doc->itemToolPrefs().polyFactor = ScCLocale::toDoubleC(dc.attribute("POLYF"), 0.5);
 		m_Doc->itemToolPrefs().polyRotation = ScCLocale::toDoubleC(dc.attribute("POLYR"), 0.0);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Mon Dec 31 20:54:39 2012
@@ -2039,7 +2039,7 @@
 	m_Doc->rulerYoffset = attrs.valueAsDouble("rulerYoffset", 0.0);
 	m_Doc->SnapGuides   = attrs.valueAsBool("SnapToGuides", false);
 	m_Doc->SnapElement  = attrs.valueAsBool("SnapToElement", false);
-	m_Doc->useRaster    = attrs.valueAsBool("SnapToGrid", false);
+	m_Doc->SnapGrid     = attrs.valueAsBool("SnapToGrid", false);
 	
 	m_Doc->setAutoSave(attrs.valueAsBool("AutoSave", false));
 	m_Doc->setAutoSaveTime(attrs.valueAsInt("AutoSaveTime", 600000));
@@ -3961,10 +3961,10 @@
 	pat.yoffset = attrs.valueAsDouble("yoffset", 0.0);
 	
 	uint itemCount1 = m_Doc->Items->count();
-	bool savedAlignGrid = m_Doc->useRaster;
+	bool savedAlignGrid = m_Doc->SnapGrid;
 	bool savedAlignGuides = m_Doc->SnapGuides;
 	bool savedAlignElement = m_Doc->SnapElement;
-	m_Doc->useRaster = false;
+	m_Doc->SnapGrid  = false;
 	m_Doc->SnapGuides = false;
 	m_Doc->SnapElement = false;
 
@@ -4029,7 +4029,7 @@
 		}
 	}
 
-	doc->useRaster  = savedAlignGrid;
+	doc->SnapGrid   = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	doc->SnapElement = savedAlignElement;
 	if (!success)

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Dec 31 20:54:39 2012
@@ -277,7 +277,7 @@
 	docu.writeAttribute("AUTOCHECK", static_cast<int>(m_Doc->hyphAutoCheck()));
 	docu.writeAttribute("GUIDELOCK", static_cast<int>(m_Doc->GuideLock));
 	docu.writeAttribute("SnapToGuides", static_cast<int>(m_Doc->SnapGuides));
-	docu.writeAttribute("SnapToGrid", static_cast<int>(m_Doc->useRaster));
+	docu.writeAttribute("SnapToGrid", static_cast<int>(m_Doc->SnapGrid));
 	docu.writeAttribute("MINGRID", m_Doc->guidesPrefs().minorGridSpacing);
 	docu.writeAttribute("MAJGRID", m_Doc->guidesPrefs().majorGridSpacing);
 	docu.writeAttribute("SHOWGRID", static_cast<int>(m_Doc->guidesPrefs().gridShown));

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Dec 31 20:54:39 2012
@@ -2572,7 +2572,7 @@
 	scrActions["viewFit200"]->setEnabled(true);
 	scrActions["viewFit400"]->setEnabled(true);
 
-	scrActions["viewSnapToGrid"]->setChecked(doc->useRaster);
+	scrActions["viewSnapToGrid"]->setChecked(doc->SnapGrid);
 	scrActions["viewSnapToGuides"]->setChecked(doc->SnapGuides);
 	scrActions["viewSnapToElements"]->setChecked(doc->SnapElement);
 	scrActions["viewShowRulers"]->setEnabled(true);
@@ -3591,17 +3591,17 @@
 				pasteAction = new UndoTransaction(undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::Create,"",Um::ICreate));
 			view->Deselect(true);
 			uint ac = doc->Items->count();
-			bool savedAlignGrid = doc->useRaster;
+			bool savedAlignGrid = doc->SnapGrid;
 			bool savedAlignGuides = doc->SnapGuides;
 			bool savedAlignElement = doc->SnapElement;
-			doc->useRaster = false;
+			doc->SnapGrid = false;
 			doc->SnapGuides = false;
 			doc->SnapElement = false;
 			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->SnapGrid = savedAlignGrid;
 			doc->SnapGuides = savedAlignGuides;
 			doc->SnapElement = savedAlignElement;
 			Selection tmpSelection(this, false);
@@ -5377,7 +5377,7 @@
 			}
 			else if (ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment())
 			{
-				bool savedAlignGrid = doc->useRaster;
+				bool savedAlignGrid = doc->SnapGrid;
 				bool savedAlignGuides = doc->SnapGuides;
 				bool savedAlignElement = doc->SnapElement;
 				int ac = doc->Items->count();
@@ -5385,7 +5385,7 @@
 				double gx, gy, gh, gw;
 				FPoint minSize = doc->minCanvasCoordinate;
 				FPoint maxSize = doc->maxCanvasCoordinate;
-				doc->useRaster = false;
+				doc->SnapGrid = false;
 				doc->SnapGuides = false;
 				doc->SnapElement = false;
 				// HACK #6541 : undo does not handle text modification => do not record embedded item creation
@@ -5402,7 +5402,7 @@
 				symbolPalette->unsetDoc();
 				symbolPalette->setDoc(doc);
 
-				doc->useRaster = savedAlignGrid;
+				doc->SnapGrid = savedAlignGrid;
 				doc->SnapGuides = savedAlignGuides;
 				doc->SnapElement = savedAlignElement;
 				//int tempList=doc->m_Selection->backupToTempList(0);
@@ -5476,10 +5476,10 @@
 			{
 				view->Deselect(true);
 				uint ac = doc->Items->count();
-				bool savedAlignGrid = doc->useRaster;
+				bool savedAlignGrid = doc->SnapGrid;
 				bool savedAlignGuides = doc->SnapGuides;
 				bool savedAlignElement = doc->SnapElement;
-				doc->useRaster = false;
+				doc->SnapGrid = false;
 				doc->SnapGuides = false;
 				doc->SnapElement = false;
 				if (internalCopy)
@@ -5500,7 +5500,7 @@
 				inlinePalette->unsetDoc();
 				inlinePalette->setDoc(doc);
 
-				doc->useRaster = savedAlignGrid;
+				doc->SnapGrid = savedAlignGrid;
 				doc->SnapGuides = savedAlignGuides;
 				doc->SnapElement = savedAlignElement;
 				doc->m_Selection->delaySignalsOn();
@@ -6215,7 +6215,7 @@
 		ToggleMarks();
 		ToggleFrames();
 		ToggleLayerMarkers();
-		ToggleRaster();
+		ToggleGrid();
 		ToggleGuides();
 		ToggleColumnBorders();
 		ToggleBase();
@@ -6309,7 +6309,7 @@
 	}
 }
 
-void ScribusMainWindow::ToggleRaster()
+void ScribusMainWindow::ToggleGrid()
 {
 	if (doc)
 	{
@@ -6406,11 +6406,11 @@
 	}
 }
 
-void ScribusMainWindow::ToggleURaster()
+void ScribusMainWindow::ToggleUGrid()
 {
 	if (doc)
 	{
-		doc->useRaster = !doc->useRaster;
+		doc->SnapGrid = !doc->SnapGrid;
 		slotDocCh();
 	}
 }
@@ -7718,11 +7718,11 @@
 void ScribusMainWindow::duplicateItem()
 {
 	slotSelect();
-	bool savedAlignGrid = doc->useRaster;
+	bool savedAlignGrid = doc->SnapGrid;
 	bool savedAlignGuides = doc->SnapGuides;
 	bool savedAlignElement = doc->SnapElement;
 	internalCopy = true;
-	doc->useRaster = false;
+	doc->SnapGrid  = false;
 	doc->SnapGuides = false;
 	doc->SnapElement = false;
 	slotEditCopy();
@@ -7742,7 +7742,7 @@
 		delete trans;
 		trans = NULL;
 	}
-	doc->useRaster = savedAlignGrid;
+	doc->SnapGrid  = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	doc->SnapElement = savedAlignElement;
 	internalCopy = false;
@@ -10294,7 +10294,7 @@
 void ScribusMainWindow::PutToInline(QString buffer)
 {
 	Selection tempSelection(*doc->m_Selection);
-	bool savedAlignGrid = doc->useRaster;
+	bool savedAlignGrid = doc->SnapGrid;
 	bool savedAlignGuides = doc->SnapGuides;
 	bool savedAlignElement = doc->SnapElement;
 	int ac = doc->Items->count();
@@ -10302,12 +10302,12 @@
 	double gx, gy, gh, gw;
 	FPoint minSize = doc->minCanvasCoordinate;
 	FPoint maxSize = doc->maxCanvasCoordinate;
-	doc->useRaster = false;
+	doc->SnapGrid  = false;
 	doc->SnapGuides = false;
 	doc->SnapElement = false;
 	undoManager->setUndoEnabled(false);
 	slotElemRead(buffer, 0, 0, false, true, doc, view);
-	doc->useRaster = savedAlignGrid;
+	doc->SnapGrid  = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	doc->SnapElement = savedAlignElement;
 	doc->m_Selection->clear();

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Mon Dec 31 20:54:39 2012
@@ -410,9 +410,9 @@
 	/** \brief Schaltet M_ViewShowImages ein/aus */
 	void TogglePics();
 	/** \brief Schaltet Raster ein/aus */
-	void ToggleRaster();
+	void ToggleGrid();
 	/** \brief Schaltet Rasterbenutzung ein/aus */
-	void ToggleURaster();
+	void ToggleUGrid();
 	/** \brief Schaltet Rahmenbearbeitung ein/aus */
 	void toggleNodeEdit();
 	void slotSelect();

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Dec 31 20:54:39 2012
@@ -216,6 +216,7 @@
 	NrItems(0),
 	First(1), Last(0),
 	viewCount(0), viewID(0),
+	SnapGrid(false),
 	SnapGuides(false),
 	SnapElement(false), GuideLock(false),
 	minCanvasCoordinate(FPoint(0, 0)),
@@ -226,7 +227,6 @@
 	m_Selection(new Selection(this, true)),
 	PageSp(1), PageSpa(0),
 	FirstPnum(1),
-	useRaster(false),
 	PageColors(this, true),
 	appMode(modeNormal),
 	SubMode(-1),
@@ -318,6 +318,7 @@
 	NrItems(0),
 	First(1), Last(0),
 	viewCount(0), viewID(0),
+	SnapGrid(false),
 	SnapGuides(false),
 	SnapElement(false),
 	GuideLock(false),
@@ -329,7 +330,6 @@
 	m_Selection(new Selection(this, true)),
 	PageSp(pagesSetup.columnCount), PageSpa(pagesSetup.columnDistance),
 	FirstPnum(pagesSetup.firstPageNumber),
-	useRaster(false),
 	PageColors(this, true),
 	appMode(modeNormal),
 	SubMode(-1),
@@ -7135,10 +7135,10 @@
 			if (Layers.count()!= 0)
 			{
 				int currActiveLayer = activeLayer();
-				bool savedAlignGrid   = this->useRaster;
+				bool savedAlignGrid   = this->SnapGrid;
 				bool savedAlignGuides = this->SnapGuides;
 				bool savedAlignElement = this->SnapElement;
-				this->useRaster  = false;
+				this->SnapGrid   = false;
 				this->SnapGuides = false;
 				this->SnapElement = false;
 				for (it = Layers.begin(); it != Layers.end(); ++it)
@@ -7152,7 +7152,7 @@
 					}
 					lcount++;
 				}
-				this->useRaster  = savedAlignGrid;
+				this->SnapGrid   = savedAlignGrid;
 				this->SnapGuides = savedAlignGuides;
 				this->SnapElement = savedAlignElement;
 				setActiveLayer(currActiveLayer);
@@ -10668,10 +10668,10 @@
 	else
 	{
 		QList<PageItem*> Elements;
-		bool savedAlignGrid = useRaster;
+		bool savedAlignGrid = SnapGrid;
 		bool savedAlignGuides = SnapGuides;
 		bool savedAlignElement = SnapElement;
-		useRaster = false;
+		SnapGrid  = false;
 		SnapGuides = false;
 		SnapElement = false;
 		DoDrawing = false;
@@ -10767,7 +10767,7 @@
 		}
 		m_Selection->setGroupRect();
 		RotMode (rotBack);
-		useRaster = savedAlignGrid;
+		SnapGrid  = savedAlignGrid;
 		SnapGuides = savedAlignGuides;
 		SnapElement = savedAlignElement;
 		DoDrawing = true;
@@ -13418,7 +13418,7 @@
 {
 	QPoint np;
 	int onp = OnPage(in.x(), in.y());
-	if (useRaster && (onp != -1))
+	if (SnapGrid && (onp != -1))
 	{
 		np.setX(static_cast<int>(qRound((in.x() - Pages->at(onp)->xOffset()) / docPrefsData.guidesPrefs.minorGridSpacing) * docPrefsData.guidesPrefs.minorGridSpacing + Pages->at(onp)->xOffset()));
 		np.setY(static_cast<int>(qRound((in.y() - Pages->at(onp)->yOffset()) / docPrefsData.guidesPrefs.minorGridSpacing) * docPrefsData.guidesPrefs.minorGridSpacing + Pages->at(onp)->yOffset()));
@@ -13433,7 +13433,7 @@
 {
 	FPoint np;
 	int onp = OnPage(in.x(), in.y());
-	if (useRaster && (onp != -1))
+	if (SnapGrid && (onp != -1))
 	{
 		np.setX(qRound((in.x() - Pages->at(onp)->xOffset()) / docPrefsData.guidesPrefs.minorGridSpacing) * docPrefsData.guidesPrefs.minorGridSpacing + Pages->at(onp)->xOffset());
 		np.setY(qRound((in.y() - Pages->at(onp)->yOffset()) / docPrefsData.guidesPrefs.minorGridSpacing) * docPrefsData.guidesPrefs.minorGridSpacing + Pages->at(onp)->yOffset());
@@ -13981,7 +13981,7 @@
 	double oldx = currItem->xPos();
 	double oldy = currItem->yPos();
 	currItem->moveBy(newX, newY);
-/*	if ((useRaster) && (!m_View->operItemMoving) && (!fromMP) && (static_cast<int>(currentPage()->pageNr()) == currItem->OwnPage))
+/*	if ((SnapGrid) && (!m_View->operItemMoving) && (!fromMP) && (static_cast<int>(currentPage()->pageNr()) == currItem->OwnPage))
 	{
 		FPoint np = ApplyGridF(FPoint(currItem->xPos(), currItem->yPos()));
 		currItem->setXYPos(np.x(), np.y());

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Mon Dec 31 20:54:39 2012
@@ -1216,6 +1216,7 @@
 	int Last;
 	int viewCount;
 	int viewID;
+	bool SnapGrid;
 	bool SnapGuides;
 	bool SnapElement;
 	bool GuideLock;
@@ -1252,8 +1253,6 @@
 	//int currentPageLayout;
 	/** \brief Erste Seitennummer im Dokument */
 	int FirstPnum;
-	/** \brief Flag fuer Rasterbenutzung */
-	bool useRaster;
 	/** \brief Im Dokument benutzte Farben */
 	ColorList PageColors;
 	int appMode;

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Mon Dec 31 20:54:39 2012
@@ -1282,7 +1282,7 @@
 				Doc->m_Selection->connectItemToGUI();
 				currItem = Doc->m_Selection->itemAt(0);
 				currItem->LayerID = Doc->activeLayer();
-				if (Doc->useRaster)
+				if (Doc->SnapGrid)
 				{
 					double nx = currItem->xPos();
 					double ny = currItem->yPos();
@@ -1991,11 +1991,11 @@
 		activeTransaction = new UndoTransaction(undoManager->beginTransaction(Doc->currentPage()->getUName(), 0, Um::Paste, "", Um::IPaste));
 /*	if (ScMimeData::clipboardHasScribusFragment())
 	{
-		bool savedAlignGrid = Doc->useRaster;
+		bool savedAlignGrid = Doc->SnapGrid;
 		bool savedAlignGuides = Doc->SnapGuides;
 		QByteArray fragment   = ScMimeData::clipboardScribusFragment();
 		Selection pastedObjects = Doc->serializer()->deserializeObjects(fragment);
-		Doc->useRaster = savedAlignGrid;
+		Doc->SnapGrid = savedAlignGrid;
 		Doc->SnapGuides = savedAlignGuides;
 		pastedObjects.setGroupRect();
 		double gx, gy, gh, gw;
@@ -2050,7 +2050,7 @@
 	else if (newObjects.count() == 1)
 	{
 		PageItem *currItem = newObjects.itemAt(0);
-		if (Doc->useRaster)
+		if (Doc->SnapGrid)
 		{
 			double nx = currItem->xPos();
 			double ny = currItem->yPos();

Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18027&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Mon Dec 31 20:54:39 2012
@@ -1288,10 +1288,10 @@
 	QString patNam = fi.baseName().trimmed().simplified().replace(" ", "_");
 	uint ac = m_doc->Items->count();
 	uint ap = m_doc->docPatterns.count();
-	bool savedAlignGrid = m_doc->useRaster;
+	bool savedAlignGrid = m_doc->SnapGrid;
 	bool savedAlignGuides = m_doc->SnapGuides;
 	bool savedAlignElement = m_doc->SnapElement;
-	m_doc->useRaster = false;
+	m_doc->SnapGrid = false;
 	m_doc->SnapGuides = false;
 	m_doc->SnapElement = false;
 	if (fi.suffix().toLower() == "sce")
@@ -1314,7 +1314,7 @@
 			}
 		}
 	}
-	m_doc->useRaster = savedAlignGrid;
+	m_doc->SnapGrid = savedAlignGrid;
 	m_doc->SnapGuides = savedAlignGuides;
 	m_doc->SnapElement = savedAlignElement;
 	uint ae = m_doc->Items->count();




More information about the scribus-commit mailing list