r17747 by craig - #10798: Chelen, apply update patch. Also patch writing keyboard shortcuts to file to convert from native to standard names

scribus-commit scribus-commit at lists.scribus.net
Wed Aug 1 20:29:54 UTC 2012


Author: craig
Date: Wed Aug  1 20:29:54 2012
New Revision: 17747

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17747
Log:
#10798: Chelen, apply update patch. Also patch writing keyboard shortcuts to file to convert from native to standard names

Modified:
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/canvasmode_editpolygon.cpp
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/canvasmode_objimport.cpp
    trunk/Scribus/scribus/guidesmodel.cpp
    trunk/Scribus/scribus/pageitem_textframe.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/plugins/import/ai/importaiplugin.cpp
    trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
    trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
    trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
    trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
    trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
    trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
    trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
    trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/guidemanager.cpp
    trunk/Scribus/scribus/ui/layers.cpp
    trunk/Scribus/scribus/ui/paintmanager.cpp
    trunk/Scribus/scribus/ui/prefs_itemtools.cpp
    trunk/Scribus/scribus/ui/prefs_spelling.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp Wed Aug  1 20:29:54 2012
@@ -300,6 +300,10 @@
 				double ny = np2.y();
 				m_doc->ApplyGuides(&nx, &ny);
 				m_doc->ApplyGuides(&nx, &ny,true);
+				if(nx!=np2.x())
+					xSnap = nx * m_canvas->scale();
+				if(ny!=np2.y())
+					ySnap = ny * m_canvas->scale();
 				// #8959 : suppress qRound here as this prevent drawing line with angle constrain
 				// precisely and does not allow to stick precisely to grid or guides
 				newX = /*qRound(*/nx/*)*/;

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp Wed Aug  1 20:29:54 2012
@@ -242,7 +242,9 @@
 	{
 		if (RecordP.size() > 1)
 		{
-			UndoTransaction createTransaction(UndoManager::instance()->beginTransaction());
+			UndoTransaction *createTransaction = NULL;
+			if(UndoManager::undoEnabled())
+				createTransaction = new UndoTransaction(UndoManager::instance()->beginTransaction());
 			uint z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, Mxp, Myp, 1, 1, m_doc->itemToolPrefs().calligrapicPenLineWidth, m_doc->itemToolPrefs().calligrapicPenFillColor, m_doc->itemToolPrefs().calligrapicPenLineColor, true);
 			currItem = m_doc->Items->at(z);
 			currItem->PoLine.resize(0);
@@ -283,7 +285,12 @@
 			QString targetName = Um::ScratchSpace;
 			if (currItem->OwnPage > -1)
 				targetName = m_doc->Pages->at(currItem->OwnPage)->getUName();
-			createTransaction.commit(targetName, currItem->getUPixmap(), Um::Create + " " + currItem->getUName(),  "", Um::ICreate);
+			if(createTransaction)
+			{
+				createTransaction->commit(targetName, currItem->getUPixmap(), Um::Create + " " + currItem->getUName(),  "", Um::ICreate);
+				delete createTransaction;
+				createTransaction = NULL;
+			}
 			//FIXME	
 			m_canvas->m_viewMode.operItemResizing = false;
 			m_doc->changed();

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp Wed Aug  1 20:29:54 2012
@@ -227,19 +227,8 @@
 	QRectF upRect2 = QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight);
 	upRect = upRect2.united(upRect);
 	upRect.translate(currItem->xPos(), currItem->yPos());
-	ScItemState<QPair<FPointArray, FPointArray> > *ss = new ScItemState<QPair<FPointArray, FPointArray> >(Um::EditArc,"",Um::IPolygon);
-	FPointArray old = item->PoLine;
-	ss->set("ARC","arc");
-	ss->set("OLD_WIDTH",item->arcWidth);
-	ss->set("NEW_WIDTH",width);
-	ss->set("OLD_XPOS",item->xPos());
-	ss->set("OLD_YPOS",item->yPos());
-	ss->set("OLD_HEIGHT",item->arcHeight);
-	ss->set("NEW_HEIGHT",height);
-	item->arcWidth = width;
-	item->arcHeight = height;
 	QTransform bb;
-	bb.scale(item->arcHeight / item->arcWidth, 1.0);
+	bb.scale(height / width, 1.0);
 	QLineF inp = QLineF(QPointF(width / 2.0, height / 2.0), QPointF(width, height / 2.0));
 	inp.setAngle(start);
 	QLineF res = bb.map(inp);
@@ -252,22 +241,34 @@
 		nSweep += 360;
 	QPainterPath pp;
 	pp.moveTo(mPoint);
-	pp.arcTo(QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight), startAngle, nSweep);
+	pp.arcTo(QRectF(mPoint.x() - width / 2.0, mPoint.y() - height / 2.0, width, height), startAngle, nSweep);
 	pp.closeSubpath();
 	currItem->PoLine.fromQPainterPath(pp);
-	undoManager->setUndoEnabled(false);
 	m_doc->AdjustItemSize(currItem);
-	undoManager->setUndoEnabled(true);
-	ss->set("OLD_START",item->arcStartAngle);
-	ss->set("NEW_START",startAngle);
-	ss->set("OLD_SWEEP",item->arcSweepAngle);
-	ss->set("NEW_SWEEP",nSweep);
-	ss->setItem(qMakePair(old,item->PoLine));
+	if(UndoManager::undoEnabled())
+	{
+		ScItemState<QPair<FPointArray, FPointArray> > *ss = new ScItemState<QPair<FPointArray, FPointArray> >(Um::EditArc,"",Um::IPolygon);
+		FPointArray old = item->PoLine;
+		ss->set("ARC","arc");
+		ss->set("OLD_WIDTH",item->arcWidth);
+		ss->set("NEW_WIDTH",width);
+		ss->set("OLD_XPOS",item->xPos());
+		ss->set("OLD_YPOS",item->yPos());
+		ss->set("OLD_HEIGHT",item->arcHeight);
+		ss->set("NEW_HEIGHT",height);
+		ss->set("OLD_START",item->arcStartAngle);
+		ss->set("NEW_START",startAngle);
+		ss->set("OLD_SWEEP",item->arcSweepAngle);
+		ss->set("NEW_SWEEP",nSweep);
+		ss->setItem(qMakePair(old,item->PoLine));
+		ss->set("NEW_XPOS",item->xPos());
+		ss->set("NEW_YPOS",item->yPos());
+		undoManager->action(currItem,ss);
+	}
 	item->arcStartAngle = startAngle;
 	item->arcSweepAngle = nSweep;
-	ss->set("NEW_XPOS",item->xPos());
-	ss->set("NEW_YPOS",item->yPos());
-	undoManager->action(currItem,ss);
+	item->arcWidth = width;
+	item->arcHeight = height;
 	startPoint = currItem->PoLine.pointQF(2);
 	endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 4);
 	centerPoint = currItem->PoLine.pointQF(0);

Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp Wed Aug  1 20:29:54 2012
@@ -932,7 +932,7 @@
 	m_canvas->resetRenderMode();
 	m->accept();
 	PageItem* currItem = m_doc->m_Selection->itemAt(0);
-	if(m_gradientPoint != noPointDefined){
+	if(m_gradientPoint != noPointDefined && UndoManager::undoEnabled()){
 		QList<FPoint> tmp;
 		ScItemState<QList<FPoint> > *is = new ScItemState<QList<FPoint> >(Um::GradPos + "i");
 		is->set("GRAD_POS","grad_pos");

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp Wed Aug  1 20:29:54 2012
@@ -972,7 +972,7 @@
 	m_canvas->resetRenderMode();
 	m->accept();
 	PageItem *currItem = m_doc->m_Selection->itemAt(0);
-	if (currItem->selectedMeshPointX >=0 && currItem->selectedMeshPointY >=0)
+	if (currItem->selectedMeshPointX >=0 && currItem->selectedMeshPointY >=0 && UndoManager::undoEnabled())
 	{
 		ScItemState<QPair<meshPoint,meshPoint> > *ss = new ScItemState<QPair<meshPoint,meshPoint> >(Um::GradPos);
 		ss->set("MOVE_MESH_PATCH","move_mesh_patch");

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp Wed Aug  1 20:29:54 2012
@@ -972,7 +972,7 @@
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
 	m_canvas->resetRenderMode();
 	m->accept();
-	if (m_view->editStrokeGradient != 11 && currItem->selectedMeshPointX >=0 && m_patchPoint != noPointDefined)
+	if (m_view->editStrokeGradient != 11 && currItem->selectedMeshPointX >=0 && m_patchPoint != noPointDefined && UndoManager::undoEnabled())
 	{
 		ScItemState<QPair<meshPoint,meshPoint> > *ss = new ScItemState<QPair<meshPoint,meshPoint> >(Um::GradPos);
 		ss->set("MOVE_MESH_PATCH","move_mesh_patch");

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp Wed Aug  1 20:29:54 2012
@@ -251,23 +251,26 @@
 	polyCurvature = polyCur;
 	polyInnerRot = polyIRot;
 	polyOuterCurvature = polyOCur;
-	SimpleState *ss = new SimpleState(Um::EditPolygon,"",Um::IPolygon);
-	ss->set("POLYGON","polygon");
-	ss->set("NEW_CORNER",polyC);
-	ss->set("NEW_USEFACTOR",polyUseCF);
-	ss->set("NEW_FACTOR",polyFactor);
-	ss->set("NEW_ROTATION",polyRotation);
-	ss->set("NEW_CURV",polyCurvature);
-	ss->set("NEW_INNER",polyInnerRot);
-	ss->set("NEW_OUTER",polyOuterCurvature);
-	ss->set("OLD_CORNER",item->polyCorners);
-	ss->set("OLD_USEFACTOR",item->polyUseFactor);
-	ss->set("OLD_FACTOR",item->polyFactor);
-	ss->set("OLD_ROTATION",item->polyRotation);
-	ss->set("OLD_CURV",item->polyCurvature);
-	ss->set("OLD_INNER",item->polyInnerRot);
-	ss->set("OLD_OUTER",item->polyOuterCurvature);
-	undoManager->action(currItem,ss);
+	if(UndoManager::undoEnabled())
+	{
+		SimpleState *ss = new SimpleState(Um::EditPolygon,"",Um::IPolygon);
+		ss->set("POLYGON","polygon");
+		ss->set("NEW_CORNER",polyC);
+		ss->set("NEW_USEFACTOR",polyUseCF);
+		ss->set("NEW_FACTOR",polyFactor);
+		ss->set("NEW_ROTATION",polyRotation);
+		ss->set("NEW_CURV",polyCurvature);
+		ss->set("NEW_INNER",polyInnerRot);
+		ss->set("NEW_OUTER",polyOuterCurvature);
+		ss->set("OLD_CORNER",item->polyCorners);
+		ss->set("OLD_USEFACTOR",item->polyUseFactor);
+		ss->set("OLD_FACTOR",item->polyFactor);
+		ss->set("OLD_ROTATION",item->polyRotation);
+		ss->set("OLD_CURV",item->polyCurvature);
+		ss->set("OLD_INNER",item->polyInnerRot);
+		ss->set("OLD_OUTER",item->polyOuterCurvature);
+		undoManager->action(currItem,ss);
+	}
 	item->polyCorners = polyC;
 	item->polyUseFactor = polyUseCF;
 	item->polyFactor = polyFactor;
@@ -453,7 +456,7 @@
 	}
 	else
 		m_polygonPoint = noPointDefined;
-	if(m_polygonPoint != noPointDefined)
+	if(m_polygonPoint != noPointDefined && UndoManager::undoEnabled())
 		trans = new UndoTransaction(undoManager->beginTransaction(Um::Polygon,Um::IPolygon,Um::EditPolygon,"",Um::IPolygon));
 	qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
 	QPainterPath path = itemMatrix.map(RegularPolygonPath(currItem->width(), currItem->height(), polyCorners, polyUseFactor, polyFactor, polyRotation, polyCurvature, polyInnerRot, polyOuterCurvature));

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Wed Aug  1 20:29:54 2012
@@ -459,10 +459,7 @@
 			}
 			m_doc->nodeEdit.moveClipPoint(currItem, npf);
 		}
-
-		undoManager->setUndoEnabled(false);
 		m_doc->AdjustItemSize(currItem, true, true);
-		undoManager->setUndoEnabled(true);
 		if (!m_doc->nodeEdit.isContourLine)
 			currItem->ContourLine.translate(xposOrig - currItem->xPos(), yposOrig - currItem->yPos());
 		m_doc->regionsChanged()->update(QRectF());

Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp Wed Aug  1 20:29:54 2012
@@ -179,6 +179,7 @@
 		{
 			undoTransaction->commit();
 			delete undoTransaction;
+			undoTransaction = NULL;
 		}
 		// Return to normal mode
 		m_view->requestMode(modeNormal);

Modified: trunk/Scribus/scribus/guidesmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/guidesmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/guidesmodel.cpp (original)
+++ trunk/Scribus/scribus/guidesmodel.cpp Wed Aug  1 20:29:54 2012
@@ -48,13 +48,13 @@
 	if (role == Qt::DisplayRole)
 	{
 		QLocale l;
-		return QVariant(l.toString(pts2value(m_values.at(index.row()),
-											  m_docUnitIndex) - rule, 'f',
+		return QVariant(l.toString(pts2value(m_values.at(index.row()) - rule,
+											  m_docUnitIndex), 'f',
 											  m_docUnitDecimals)
 						);
 	}
 	if (role == Qt::EditRole)
-		return pts2value(m_values.at(index.row()), m_docUnitIndex);
+		return pts2value(m_values.at(index.row()) - rule, m_docUnitIndex);
 
 	if (role == Qt::BackgroundColorRole && m_values.at(index.row()) == 0.0)
 		return QVariant(Qt::red);

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Wed Aug  1 20:29:54 2012
@@ -3461,7 +3461,9 @@
 			unicodeInputString = "";
 			if (ok)
 			{
-				UndoTransaction trans(undoManager->beginTransaction(Um::Selection,Um::ITextFrame,Um::InsertText,"",Um::IDelete));
+				UndoTransaction *trans = NULL;
+				if(UndoManager::undoEnabled())
+					trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::ITextFrame,Um::InsertText,"",Um::IDelete));
 				if (itemText.lengthOfSelection() > 0)
 					deleteSelectedTextFromFrame();
 				if (conv < 31)
@@ -3481,7 +3483,12 @@
 					}
 				}
 				itemText.insertChars(QString(QChar(conv)), true);
-				trans.commit();
+				if(trans)
+				{
+					trans->commit();
+					delete trans;
+					trans = NULL;
+				}
 //				Tinput = true;
 				m_Doc->scMW()->setTBvals(this);
 				update();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&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 Wed Aug  1 20:29:54 2012
@@ -1016,15 +1016,9 @@
 	doc->itemToolPrefs().shapeLineColorShade     = attrs.valueAsInt("PENSHADE", 100);
 	doc->itemToolPrefs().lineColor  = attrs.valueAsInt("LINESHADE", 100);
 	doc->itemToolPrefs().shapeFillColorShade      = attrs.valueAsInt("BRUSHSHADE", 100);
-	doc->opToolPrefs().magMin      = attrs.valueAsInt("MAGMIN", 1);
-	doc->opToolPrefs().magMax      = attrs.valueAsInt("MAGMAX", 3200);
-	doc->opToolPrefs().magStep     = attrs.valueAsInt("MAGSTEP", 125);
 	doc->opToolPrefs().dispX       = attrs.valueAsDouble("dispX", 10.0);
 	doc->opToolPrefs().dispY       = attrs.valueAsDouble("dispY", 10.0);
 	doc->opToolPrefs().constrain   = attrs.valueAsDouble("constrain", 15.0);
-	//CB Reset doc zoom step value to 200% instead of old values.
-	if (doc->opToolPrefs().magStep <= 100)
-		doc->opToolPrefs().magStep = 125;
 	doc->itemToolPrefs().textTabFillChar = attrs.valueAsString("TabFill","");
 	doc->itemToolPrefs().textTabWidth   = attrs.valueAsDouble("TabWidth", 36.0);
 	if (attrs.hasAttribute("CPICT"))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&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 Wed Aug  1 20:29:54 2012
@@ -207,9 +207,6 @@
 	docu.writeAttribute("PENSHADE",m_Doc->itemToolPrefs().shapeLineColorShade);
 	docu.writeAttribute("LINESHADE",m_Doc->itemToolPrefs().lineColorShade);
 	docu.writeAttribute("BRUSHSHADE",m_Doc->itemToolPrefs().shapeFillColorShade);
-	docu.writeAttribute("MAGMIN",m_Doc->opToolPrefs().magMin);
-	docu.writeAttribute("MAGMAX",m_Doc->opToolPrefs().magMax);
-	docu.writeAttribute("MAGSTEP",m_Doc->opToolPrefs().magStep);
 	docu.writeAttribute("CPICT",m_Doc->itemToolPrefs().imageFillColor);
 	docu.writeAttribute("PICTSHADE",m_Doc->itemToolPrefs().imageFillColorShade);
 	docu.writeAttribute("PICTSCX",m_Doc->itemToolPrefs().imageScaleX);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&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 Wed Aug  1 20:29:54 2012
@@ -400,12 +400,6 @@
 		m_Doc->itemToolPrefs().shapeLineColorShade    = dc.attribute("PENSHADE", "100").toInt();
 		m_Doc->itemToolPrefs().lineColorShade = dc.attribute("LINESHADE", "100").toInt();
 		m_Doc->itemToolPrefs().shapeFillColorShade     = dc.attribute("BRUSHSHADE", "100").toInt();
-		m_Doc->opToolPrefs().magMin     = dc.attribute("MAGMIN", "1").toInt();
-		m_Doc->opToolPrefs().magMax     = dc.attribute("MAGMAX", "3200").toInt();
-		m_Doc->opToolPrefs().magStep    = dc.attribute("MAGSTEP", "125").toInt();
-		//CB Reset doc zoom step value to 200% instead of old values.
-		if (m_Doc->opToolPrefs().magStep <= 100)
-			m_Doc->opToolPrefs().magStep = 125;
 		m_Doc->itemToolPrefs().textTabFillChar = dc.attribute("TabFill","");
 		m_Doc->itemToolPrefs().textTabWidth   = ScCLocale::toDoubleC(dc.attribute("TabWidth"), 36.0);
 		if (dc.hasAttribute("CPICT"))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&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 Wed Aug  1 20:29:54 2012
@@ -2138,15 +2138,9 @@
 	doc->itemToolPrefs().calligrapicPenAngle = attrs.valueAsDouble("calligrapicPenAngle", 0.0);
 	doc->itemToolPrefs().calligrapicPenWidth = attrs.valueAsDouble("calligrapicPenWidth", 10.0);
 	doc->itemToolPrefs().calligrapicPenStyle = static_cast<Qt::PenStyle>(attrs.valueAsInt("calligrapicPenStyle"));
-	doc->opToolPrefs().magMin      = attrs.valueAsInt("MAGMIN", 1);
-	doc->opToolPrefs().magMax      = attrs.valueAsInt("MAGMAX", 3200);
-	doc->opToolPrefs().magStep     = attrs.valueAsInt("MAGSTEP", 125);
 	doc->opToolPrefs().dispX       = attrs.valueAsDouble("dispX", 10.0);
 	doc->opToolPrefs().dispY       = attrs.valueAsDouble("dispY", 10.0);
 	doc->opToolPrefs().constrain   = attrs.valueAsDouble("constrain", 15.0);
-	//CB Reset doc zoom step value to 200% instead of old values.
-	if (doc->opToolPrefs().magStep <= 100)
-		doc->opToolPrefs().magStep = 125;
 	doc->itemToolPrefs().textTabFillChar = attrs.valueAsString("TabFill","");
 	doc->itemToolPrefs().textTabWidth   = attrs.valueAsDouble("TabWidth", 36.0);
 	if (attrs.hasAttribute("CPICT"))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&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 Wed Aug  1 20:29:54 2012
@@ -332,9 +332,6 @@
 	docu.writeAttribute("PENSHADE",m_Doc->itemToolPrefs().shapeLineColorShade);
 	docu.writeAttribute("LINESHADE",m_Doc->itemToolPrefs().lineColorShade);
 	docu.writeAttribute("BRUSHSHADE",m_Doc->itemToolPrefs().shapeFillColorShade);
-	docu.writeAttribute("MAGMIN",m_Doc->opToolPrefs().magMin);
-	docu.writeAttribute("MAGMAX",m_Doc->opToolPrefs().magMax);
-	docu.writeAttribute("MAGSTEP",m_Doc->opToolPrefs().magStep);
 	docu.writeAttribute("CPICT",m_Doc->itemToolPrefs().imageFillColor);
 	docu.writeAttribute("PICTSHADE",m_Doc->itemToolPrefs().imageFillColorShade);
 	docu.writeAttribute("CSPICT",m_Doc->itemToolPrefs().imageStrokeColor);

Modified: trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp Wed Aug  1 20:29:54 2012
@@ -224,40 +224,28 @@
 
 QImage ImportAIPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	AIPlug *dia = new AIPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }
 
 bool ImportAIPlugin::readColors(const QString& fileName, ColorList &colors)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return false;
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	AIPlug *dia = new AIPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	bool ret = dia->readColors(fileName, colors);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp Wed Aug  1 20:29:54 2012
@@ -170,17 +170,12 @@
 	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	CgmPlug *dia = new CgmPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp Wed Aug  1 20:29:54 2012
@@ -166,20 +166,14 @@
 
 QImage ImportCvgPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	CvgPlug *dia = new CvgPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp Wed Aug  1 20:29:54 2012
@@ -168,20 +168,14 @@
 
 QImage ImportDrwPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	DrwPlug *dia = new DrwPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp Wed Aug  1 20:29:54 2012
@@ -183,40 +183,28 @@
 
 QImage ImportIdmlPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	IdmlPlug *dia = new IdmlPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }
 
 bool ImportIdmlPlugin::readColors(const QString& fileName, ColorList &colors)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return false;
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	IdmlPlug *dia = new IdmlPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	bool ret = dia->readColors(fileName, colors);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Wed Aug  1 20:29:54 2012
@@ -220,20 +220,14 @@
 
 QImage OODrawImportPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	OODPlug *dia = new OODPlug(m_Doc);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp Wed Aug  1 20:29:54 2012
@@ -162,17 +162,12 @@
 	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	PctPlug *dia = new PctPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp Wed Aug  1 20:29:54 2012
@@ -238,20 +238,14 @@
 
 QImage ImportPdfPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	PdfPlug *dia = new PdfPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp Wed Aug  1 20:29:54 2012
@@ -161,17 +161,14 @@
 
 QImage ImportShapePlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = UndoManager::undoEnabled();
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-		UndoManager::instance()->setUndoEnabled(false);
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	ShapePlug *dia = new ShapePlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp Wed Aug  1 20:29:54 2012
@@ -168,20 +168,14 @@
 
 QImage ImportSmlPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	SmlPlug *dia = new SmlPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Wed Aug  1 20:29:54 2012
@@ -207,20 +207,14 @@
 
 QImage SVGImportPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	SVGPlug *dia = new SVGPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Wed Aug  1 20:29:54 2012
@@ -194,20 +194,14 @@
 
 QImage WMFImportPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	WMFImport *dia = new WMFImport(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp Wed Aug  1 20:29:54 2012
@@ -166,20 +166,14 @@
 
 QImage ImportWpgPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	WpgPlug *dia = new WpgPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp Wed Aug  1 20:29:54 2012
@@ -161,40 +161,28 @@
 
 QImage ImportXarPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = ScCore->primaryMainWindow()->doc;
 	XarPlug *dia = new XarPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }
 
 bool ImportXarPlugin::readColors(const QString& fileName, ColorList &colors)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return false;
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	XarPlug *dia = new XarPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	bool ret = dia->readColors(fileName, colors);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp Wed Aug  1 20:29:54 2012
@@ -166,20 +166,14 @@
 
 QImage ImportXfigPlugin::readThumbnail(const QString& fileName)
 {
-	bool wasUndo = false;
 	if( fileName.isEmpty() )
 		return QImage();
-	if (UndoManager::undoEnabled())
-	{
-		UndoManager::instance()->setUndoEnabled(false);
-		wasUndo = true;
-	}
+	UndoManager::instance()->setUndoEnabled(false);
 	m_Doc = NULL;
 	XfigPlug *dia = new XfigPlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
-	if (wasUndo)
-		UndoManager::instance()->setUndoEnabled(true);
+	UndoManager::instance()->setUndoEnabled(true);
 	delete dia;
 	return ret;
 }

Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Wed Aug  1 20:29:54 2012
@@ -56,7 +56,7 @@
 	languageChange();
 }
 
-PathConnectPlugin::~PathConnectPlugin() {};
+PathConnectPlugin::~PathConnectPlugin() {}
 
 void PathConnectPlugin::languageChange()
 {
@@ -131,11 +131,10 @@
 			int pointOne = dia->getFirstLinePoint();
 			int pointTwo = dia->getSecondLinePoint();
 			int mode = dia->getMode();
-			UndoTransaction trans(UndoManager::instance()->beginTransaction(Um::BezierCurve,Um::ILine,Um::ConnectPath,"",Um::ILine));
-			ScItemState<QPair<FPointArray,FPointArray> > *is = new ScItemState<QPair<FPointArray,FPointArray> >(Um::ConnectPath);
-			is->set("CONNECT_PATH","connect_path");
-			is->set("OLDX",originalXPos);
-			is->set("OLDY",originalYPos);
+			UndoTransaction *trans = NULL;
+			if(UndoManager::undoEnabled())
+				trans = new UndoTransaction(UndoManager::instance()->beginTransaction(Um::BezierCurve,Um::ILine,Um::ConnectPath,"",Um::ILine));
+
 			Item1->PoLine = computePath(pointOne, pointTwo, mode, originalPath1, originalPath2);
 			Item1->Frame = false;
 			Item1->ClipEdited = true;
@@ -143,16 +142,28 @@
 			currDoc->AdjustItemSize(Item1);
 			Item1->OldB2 = Item1->width();
 			Item1->OldH2 = Item1->height();
-			is->set("NEWX",Item1->xPos());
-			is->set("NEWY",Item1->yPos());
-			is->setItem(qMakePair(originalPath1,Item1->PoLine));
-			UndoManager::instance()->action(Item1,is);
+			if(UndoManager::undoEnabled())
+			{
+				ScItemState<QPair<FPointArray,FPointArray> > *is = new ScItemState<QPair<FPointArray,FPointArray> >(Um::ConnectPath);
+				is->set("CONNECT_PATH","connect_path");
+				is->set("OLDX",originalXPos);
+				is->set("OLDY",originalYPos);
+				is->set("NEWX",Item1->xPos());
+				is->set("NEWY",Item1->yPos());
+				is->setItem(qMakePair(originalPath1,Item1->PoLine));
+				UndoManager::instance()->action(Item1,is);
+			}
 			Item1->updateClip();
 			Item1->ContourLine = Item1->PoLine.copy();
 			currDoc->m_Selection->removeItem(Item1);
 			currDoc->itemSelection_DeleteItem();
 			currDoc->changed();
-			trans.commit();
+			if(trans)
+			{
+				trans->commit();
+				delete trans;
+				trans = NULL;
+			}
 		}
 		else
 		{

Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp Wed Aug  1 20:29:54 2012
@@ -67,7 +67,7 @@
 	languageChange();
 }
 
-PathFinderPlugin::~PathFinderPlugin() {};
+PathFinderPlugin::~PathFinderPlugin() {}
 
 void PathFinderPlugin::languageChange()
 {

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Wed Aug  1 20:29:54 2012
@@ -258,7 +258,7 @@
 	appPrefs.itemToolPrefs.lineEndArrow = 0;
 	appPrefs.opToolPrefs.magMin = 1;
 	appPrefs.opToolPrefs.magMax = 3200;
-	appPrefs.opToolPrefs.magStep = 125;
+	appPrefs.opToolPrefs.magStep = 25;
 	appPrefs.docSetupPrefs.docUnitIndex = 0;
 	appPrefs.itemToolPrefs.polyCorners = 4;
 	appPrefs.itemToolPrefs.polyFactor = 0.5;
@@ -1702,7 +1702,15 @@
 			continue;
 		QDomElement kscc=docu.createElement("Shortcut");
 		kscc.setAttribute("Action",ksc.value().actionName);
-		kscc.setAttribute("KeySequence",Prefs_KeyboardShortcuts::getKeyText(ksc.value().keySequence));
+		QString ks(Prefs_KeyboardShortcuts::getKeyText(ksc.value().keySequence));
+#ifdef Q_OS_MAC
+		ks.replace("Ctrl","Meta");
+		ks.replace("Cmd","Ctrl");
+#endif
+#ifdef Q_OS_WIN32
+		ks.replace("Windows","Meta");
+#endif
+		kscc.setAttribute("KeySequence",ks);
 		elem.appendChild(kscc);
 	}
 	QDomElement cosd=docu.createElement("DefaultColorSet");
@@ -2146,10 +2154,9 @@
 		{
 			appPrefs.opToolPrefs.magMin  = dc.attribute("MinimumMagnification", "1").toInt();
 			appPrefs.opToolPrefs.magMax  = dc.attribute("MaximumMagnification", "3200").toInt();
-			appPrefs.opToolPrefs.magStep = dc.attribute("MagnificationStep", "125").toInt();
-			//CB Reset prefs zoom step value to 200% instead of old values.
-			if (appPrefs.opToolPrefs.magStep <= 100)
-				appPrefs.opToolPrefs.magStep = 125;
+			appPrefs.opToolPrefs.magStep = dc.attribute("MagnificationStep", "25").toInt();
+			if (appPrefs.opToolPrefs.magStep < 0)
+				appPrefs.opToolPrefs.magStep = 25;
 			appPrefs.opToolPrefs.dispX = ScCLocale::toDoubleC(dc.attribute("DisplayOffsetX"), 10.0);
 			appPrefs.opToolPrefs.dispY = ScCLocale::toDoubleC(dc.attribute("DisplayOffsetY"), 10.0);
 			appPrefs.opToolPrefs.constrain = ScCLocale::toDoubleC(dc.attribute("RotationConstrainAngle"), 15.0);

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Aug  1 20:29:54 2012
@@ -3444,7 +3444,9 @@
 		}
 		else
 		{
-			UndoTransaction pasteAction(undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::Create,"",Um::ICreate));
+			UndoTransaction *pasteAction = NULL;
+			if(UndoManager::undoEnabled())
+				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;
@@ -3471,7 +3473,12 @@
 					AddBookMark(currItem);
 			}
 			doc->m_Selection->copy(tmpSelection, false);
-			pasteAction.commit();
+			if(pasteAction)
+			{
+				pasteAction->commit();
+				delete pasteAction;
+				pasteAction = NULL;
+			}
 		}
 		slotDocCh(false);
 		doc->regionsChanged()->update(QRectF());
@@ -6209,6 +6216,12 @@
 		doc->SnapElement = !doc->SnapElement;
 		slotDocCh();
 	}
+}
+
+void ScribusMainWindow::SetSnapElements(bool b)
+{
+	if(doc && doc->SnapElement != b)
+		ToggleUElements();
 }
 
 
@@ -6484,7 +6497,7 @@
 			ToggleFrameEdit();
 
 		//Ugly hack but I have absolutly no idea about how to do this in another way
-		if(currItem && oldMode != mode && (mode == modeEditMeshPatch || mode == modeEditMeshGradient || mode == modeEditGradientVectors || oldMode == modeEditMeshPatch || oldMode == modeEditMeshGradient || oldMode == modeEditGradientVectors || oldMode == modeEditPolygon || mode == modeEditPolygon || oldMode == modeEditArc || mode == modeEditArc || oldMode == modeEditSpiral || mode == modeEditSpiral))
+		if(UndoManager::undoEnabled() && currItem && oldMode != mode && (mode == modeEditMeshPatch || mode == modeEditMeshGradient || mode == modeEditGradientVectors || oldMode == modeEditMeshPatch || oldMode == modeEditMeshGradient || oldMode == modeEditGradientVectors || oldMode == modeEditPolygon || mode == modeEditPolygon || oldMode == modeEditArc || mode == modeEditArc || oldMode == modeEditSpiral || mode == modeEditSpiral))
 		{
 			SimpleState *ss = new SimpleState(Um::Mode);
 			ss->set("CHANGE_MODE","change_mode");
@@ -7507,14 +7520,21 @@
 	doc->SnapElement = false;
 	slotEditCopy();
 	view->Deselect(true);
-	UndoTransaction trans(undoManager->beginTransaction(Um::Selection,Um::IPolygon,Um::Duplicate,"",Um::IMultipleDuplicate));
+	UndoTransaction *trans = NULL;
+	if(UndoManager::undoEnabled())
+		trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IPolygon,Um::Duplicate,"",Um::IMultipleDuplicate));
 	slotEditPaste();
 	for (int b=0; b<doc->m_Selection->count(); ++b)
 	{
 		doc->m_Selection->itemAt(b)->setLocked(false);
 		doc->MoveItem(doc->opToolPrefs().dispX, doc->opToolPrefs().dispY, doc->m_Selection->itemAt(b));
 	}
-	trans.commit();
+	if(trans)
+	{
+		trans->commit();
+		delete trans;
+		trans = NULL;
+	}
 	doc->useRaster = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	doc->SnapElement = savedAlignElement;
@@ -9973,14 +9993,21 @@
 		TransformDialog td(this, doc);
 		if (td.exec())
 		{
-			UndoTransaction trans(undoManager->beginTransaction(Um::Selection,Um::IPolygon,Um::Transform,"",Um::IMove));
+			UndoTransaction *trans = NULL;
+			if(UndoManager::undoEnabled())
+				trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IPolygon,Um::Transform,"",Um::IMove));
 			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 			int count=td.getCount();
 			QTransform matrix(td.getTransformMatrix());
 			int basepoint=td.getBasepoint();
 			doc->itemSelection_Transform(count, matrix, basepoint);
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-			trans.commit();
+			if(trans)
+			{
+				trans->commit();
+				delete trans;
+				trans = NULL;
+			}
 		}
 	}
 }

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Wed Aug  1 20:29:54 2012
@@ -479,6 +479,7 @@
 	void ToggleBase();
 	void ToggleUGuides();
 	void ToggleUElements();
+	void SetSnapElements(bool b);
 	void EditTabs();
 	void SearchText();
 	void imageEditorExited(int, QProcess::ExitStatus);

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Wed Aug  1 20:29:54 2012
@@ -2442,7 +2442,9 @@
 	}
 	else
 		rememberOldZoomLocation(mx,my);
-	double newScale = m_canvas->scale() * static_cast<double>(Doc->opToolPrefs().magStep)/100.0;
+	double newScale = m_canvas->scale() * (1 + static_cast<double>(Doc->opToolPrefs().magStep)/100.0);
+	if(static_cast<int>(newScale*100)>static_cast<int>(100 * static_cast<double>(Doc->opToolPrefs().magStep)*Prefs->displayPrefs.displayScale/100))
+		newScale = m_canvas->scale() + static_cast<double>(Doc->opToolPrefs().magStep)*Prefs->displayPrefs.displayScale/100;
 	if (Doc->m_Selection->count() != 0)
 	{
 		PageItem *currItem = Doc->m_Selection->itemAt(0);
@@ -2468,7 +2470,11 @@
 	}
 	else
 		rememberOldZoomLocation(mx,my);
-	double newScale = m_canvas->scale() / (static_cast<double>(Doc->opToolPrefs().magStep)/100.0);
+	double newScale = m_canvas->scale() - static_cast<double>(Doc->opToolPrefs().magStep)*Prefs->displayPrefs.displayScale/100;
+	if(newScale<=Prefs->displayPrefs.displayScale/100)
+		newScale = m_canvas->scale() / (1 + static_cast<double>(Doc->opToolPrefs().magStep)/100.0);
+	if(newScale<=Prefs->displayPrefs.displayScale/100)
+		newScale = m_canvas->scale();
 	if (Doc->m_Selection->count() != 0)
 	{
 		PageItem *currItem = Doc->m_Selection->itemAt(0);
@@ -4304,6 +4310,8 @@
 	else if (event->type() == QEvent::KeyPress)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
+		if(m->key() == Qt::Key_Shift)
+			m_ScMW->SetSnapElements(false);
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyPressEvent(m);
 		else
@@ -4313,6 +4321,8 @@
 	else if (event->type() == QEvent::KeyRelease)
 	{
 		QKeyEvent* m = static_cast<QKeyEvent*> (event);
+		if(m->key() == Qt::Key_Shift)
+			m_ScMW->SetSnapElements(true);
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyReleaseEvent(m);
 		else

Modified: trunk/Scribus/scribus/ui/guidemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/guidemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/guidemanager.cpp Wed Aug  1 20:29:54 2012
@@ -518,7 +518,9 @@
 
 void GuideManager::deletePageButton_clicked()
 {
-	UndoTransaction trans(UndoManager::instance()->beginTransaction(currentPage->getUName(),
+	UndoTransaction *trans = NULL;
+	if(UndoManager::undoEnabled())
+		trans = new UndoTransaction(UndoManager::instance()->beginTransaction(currentPage->getUName(),
 																currentPage->getUPixmap(),
 																Um::RemoveAllPageGuides, "",
 																Um::IGuides));
@@ -537,7 +539,12 @@
 	currentPage->guides.setVerticalAutoRefer(0);
 	horizontalAutoCountSpin->setValue(0);
 	verticalAutoCountSpin->setValue(0);
-	trans.commit();
+	if(trans)
+	{
+		trans->commit();
+		delete trans;
+		trans = NULL;
+	}
 
 	drawGuides();
 	m_Doc->changed();
@@ -545,7 +552,9 @@
 
 void GuideManager::deleteAllGuides_clicked()
 {
-	UndoTransaction trans(UndoManager::instance()->beginTransaction(m_Doc->getUName(),
+	UndoTransaction *trans = NULL;
+	if(UndoManager::undoEnabled())
+		trans = new UndoTransaction(UndoManager::instance()->beginTransaction(m_Doc->getUName(),
 																m_Doc->getUPixmap(),
 																Um::RemoveAllGuides, "",
 																Um::IGuides));
@@ -554,7 +563,12 @@
 	copyGuidesToAllPages(GuideManagerCore::Standard);
 	copyGuidesToAllPages(GuideManagerCore::Auto);
 	m_drawGuides = true;
-	trans.commit();
+	if(trans)
+	{
+		trans->commit();
+		delete trans;
+		trans = NULL;
+	}
 	drawGuides();
 	m_Doc->changed();
 }

Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp (original)
+++ trunk/Scribus/scribus/ui/layers.cpp Wed Aug  1 20:29:54 2012
@@ -276,7 +276,9 @@
 
 void LayerPalette::dupLayer()
 {
-	UndoTransaction copyTransaction( UndoManager::instance()->beginTransaction("", Um::ILayerAction, Um::DuplicateLayer.arg(m_Doc->activeLayerName()) , "", Um::ICreate) );
+	UndoTransaction *copyTransaction = NULL;
+	if(UndoManager::undoEnabled())
+		copyTransaction = new UndoTransaction(UndoManager::instance()->beginTransaction("", Um::ILayerAction, Um::DuplicateLayer.arg(m_Doc->activeLayerName()) , "", Um::ICreate) );
 	
 	int current = m_Doc->activeLayer();
 	
@@ -286,8 +288,12 @@
 	m_Doc->copyLayer(current, m_Doc->activeLayer());
 	m_Doc->scMW()->changeLayer(m_Doc->activeLayer());
 	m_Doc->changed();
-	
-	copyTransaction.commit();
+	if(copyTransaction)
+	{
+		copyTransaction->commit();
+		delete copyTransaction;
+		copyTransaction = NULL;
+	}
 }
 
 void LayerPalette::removeLayer()

Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Wed Aug  1 20:29:54 2012
@@ -1283,7 +1283,6 @@
 {
 	m_doc->PageColors = m_colorList;
 	m_doc->docGradients = dialogGradients;
-	bool wasUndo = UndoManager::undoEnabled();
 	UndoManager::instance()->setUndoEnabled(false);
 	m_doc->setLoading(true);
 	QFileInfo fi(data);
@@ -1387,7 +1386,7 @@
 	m_doc->setLoading(false);
 	m_colorList = m_doc->PageColors;
 	dialogGradients = m_doc->docGradients;
-	UndoManager::instance()->setUndoEnabled(wasUndo);
+	UndoManager::instance()->setUndoEnabled(true);
 }
 
 ColorList PaintManagerDialog::getGradientColors()

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp Wed Aug  1 20:29:54 2012
@@ -136,6 +136,7 @@
 	imageHorizontalScalingSpinBox->setValue(qRound(prefsData->itemToolPrefs.imageScaleX * 100));
 	imageVerticalScalingSpinBox->setValue(qRound(prefsData->itemToolPrefs.imageScaleY * 100));
 	imageKeepAspectRatioCheckBox->setChecked(prefsData->itemToolPrefs.imageAspectRatio);
+	scalingLockToolButton->setChecked(prefsData->itemToolPrefs.imageAspectRatio);
 	imageFrameFillColorComboBox->initColorList(colorList, m_doc, prefsData->itemToolPrefs.imageFillColor);
 	imageFrameFillShadingSpinBox->setValue(prefsData->itemToolPrefs.imageFillColorShade );
 	imageFrameLineColorComboBox->initColorList(colorList, m_doc, prefsData->itemToolPrefs.imageStrokeColor);
@@ -252,11 +253,6 @@
 	prefsData->itemToolPrefs.textDistances.Bottom = bottomTextDistanceSpinBox->value() / unitRatio;
 	prefsData->itemToolPrefs.textDistances.Left = leftTextDistanceSpinBox->value() / unitRatio;
 	prefsData->itemToolPrefs.textDistances.Right = rightTextDistanceSpinBox->value() / unitRatio;
-
-	//Image Tool
-	//
-	//	TODO scalingLockToolButton
-
 	prefsData->itemToolPrefs.imageFillColor = imageFrameFillColorComboBox->currentText();
 	if (prefsData->itemToolPrefs.imageFillColor == CommonStrings::tr_NoneColor)
 		prefsData->itemToolPrefs.imageFillColor = CommonStrings::None;
@@ -340,6 +336,7 @@
 //		connect(buttonGroup5, SIGNAL(toggled(bool)), this, SLOT(changeImageScalingRatio(bool)));
 		connect(scalingLockToolButton, SIGNAL(clicked()), this, SLOT(toggleImagesScalingChain()));
 		connect(imageHorizontalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageHorizontalScalingChange()));
+		connect(imageKeepAspectRatioCheckBox, SIGNAL(toggled(bool)), scalingLockToolButton, SLOT(setChecked(bool)));
 		connect(imageVerticalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageVerticalScalingChange()));
 //		connect(tabFillCombo, SIGNAL(activated(int)), this, SLOT(setFillChar(int)));
 	}
@@ -414,6 +411,7 @@
 void Prefs_ItemTools::toggleImagesScalingChain()
 {
 	imageHorizontalScalingChange();
+	imageKeepAspectRatioCheckBox->setChecked(scalingLockToolButton->isChecked());
 }
 
 void Prefs_ItemTools::imageHorizontalScalingChange()

Modified: trunk/Scribus/scribus/ui/prefs_spelling.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/prefs_spelling.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_spelling.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_spelling.cpp Wed Aug  1 20:29:54 2012
@@ -120,7 +120,7 @@
 	{
 		 i.next();
 		 int column=0;
-		 //qDebug()<<i.key()<<i.value();
+		 qDebug()<<i.key()<<i.value();
 		 QTableWidgetItem *newItem1 = new QTableWidgetItem(LanguageManager::instance()->getLangFromAbbrev(i.key()));
 		 newItem1->setFlags(newItem1->flags() & ~Qt::ItemIsEditable);
 		 dictTableWidget->setItem(row, column++, newItem1);

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Wed Aug  1 20:29:54 2012
@@ -637,7 +637,9 @@
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		QRectF upRect;
-		UndoTransaction trans(undoManager->beginTransaction(Um::Selection,Um::ILine,Um::GradPos + "p","",Um::ILine));
+		UndoTransaction *trans = NULL;
+		if(UndoManager::undoEnabled())
+			trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::ILine,Um::GradPos + "p","",Um::ILine));
 		if (m_ScMW->view->editStrokeGradient == 1)
 		{
 			m_item->setGradientStrokeStartX(x1 / m_unitRatio);
@@ -690,7 +692,7 @@
 		}
 		else
 		{
-			if (m_item->gradientType() == 13)
+			if (m_item->gradientType() == 13 && UndoManager::undoEnabled())
 			{
 				SimpleState *ss= new SimpleState("Refresh");
 				ss->set("UNDO_UPDATE_CONICAL","undo_update_conical");
@@ -709,7 +711,7 @@
 				m_item->setGradientFocalX(m_item->gradientStartX());
 				m_item->setGradientFocalY(m_item->gradientStartY());
 			}
-			if (m_item->gradientType() == 13)
+			if (m_item->gradientType() == 13 && UndoManager::undoEnabled())
 			{
 				m_item->createConicalMesh();
 				SimpleState *ss= new SimpleState("Refresh");
@@ -732,7 +734,12 @@
 			upRect |= QRectF(shP, QPointF(0, 0)).normalized();
 			upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
 		}
-		trans.commit();
+		if(trans)
+		{
+			trans->commit();
+			delete trans;
+			trans = NULL;
+		}
 		upRect.translate(m_item->xPos(), m_item->yPos());
 		m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
 		m_doc->changed();
@@ -778,7 +785,9 @@
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		QRectF upRect;
-		UndoTransaction trans(undoManager->beginTransaction(Um::Selection,Um::ILine,Um::GradPos + "o","",Um::ILine));
+		UndoTransaction *trans = NULL;
+		if(UndoManager::undoEnabled())
+			trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::ILine,Um::GradPos + "o","",Um::ILine));
 		m_item->setGradientMaskStartX(x1 / m_unitRatio);
 		m_item->setGradientMaskStartY(y1 / m_unitRatio);
 		m_item->setGradientMaskEndX(x2 / m_unitRatio);
@@ -793,7 +802,12 @@
 			m_item->setGradientMaskFocalY(m_item->GrMaskStartY);
 		}
 		m_item->update();
-		trans.commit();
+		if(trans)
+		{
+			trans->commit();
+			delete trans;
+			trans = NULL;
+		}
 		upRect = QRectF(QPointF(m_item->GrMaskStartX, m_item->GrMaskStartY), QPointF(m_item->GrMaskEndX, m_item->GrMaskEndY));
 		double radEnd = distance(m_item->GrMaskEndX - m_item->GrMaskStartX, m_item->GrMaskEndY - m_item->GrMaskStartY);
 		double rotEnd = xy2Deg(m_item->GrMaskEndX - m_item->GrMaskStartX, m_item->GrMaskEndY - m_item->GrMaskStartY);

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17747&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Wed Aug  1 20:29:54 2012
@@ -104,7 +104,7 @@
 	connect(keepImageDPIRatioButton, SIGNAL(clicked())       , this, SLOT(handleImageDPIRatio()));
 	connect(freeScale          , SIGNAL(clicked())           , this, SLOT(handleScaling()));
 	connect(frameScale         , SIGNAL(clicked())           , this, SLOT(handleScaling()));
-	connect(cbProportional     , SIGNAL(clicked())           , this, SLOT(handleScaling()));
+	connect(cbProportional     , SIGNAL(stateChanged(int))   , this, SLOT(handleScaling()));
 	connect(imgEffectsButton   , SIGNAL(clicked())           , this, SLOT(handleImageEffects()));
 	connect(imgExtProperties   , SIGNAL(clicked())           , this, SLOT(handleExtImgProperties()));
 	connect(inputProfiles      , SIGNAL(activated(const QString&)), this, SLOT(handleProfile(const QString&)));
@@ -490,6 +490,8 @@
 			//Necessary for undo action
 			keepImageWHRatioButton->setEnabled(setter);
 			keepImageDPIRatioButton->setEnabled(setter);
+			keepImageWHRatioButton->setChecked(m_item->AspectRatio);
+			keepImageDPIRatioButton->setChecked(m_item->AspectRatio);
 		}
 //CB Why do we need this? Setting it too much here
 // 		if (setter == true)
@@ -674,9 +676,13 @@
 		imgDpiY->setValue(imgDpiX->value());
 		handleLocalDpi();
 		keepImageWHRatioButton->setChecked(true);
+		cbProportional->setChecked(true);
 	}
 	else
+	{
 		keepImageWHRatioButton->setChecked(false);
+		cbProportional->setChecked(false);
+	}
 	imgDpiX->blockSignals(false);
 	imgDpiY->blockSignals(false);
 }
@@ -692,9 +698,13 @@
 		imageYScaleSpinBox->setValue(imageXScaleSpinBox->value());
 		handleLocalScale();
 		keepImageDPIRatioButton->setChecked(true);
+		cbProportional->setChecked(true);
 	}
 	else
+	{
 		keepImageDPIRatioButton->setChecked(false);
+		cbProportional->setChecked(false);
+	}
 	imageXScaleSpinBox->blockSignals(false);
 	imageYScaleSpinBox->blockSignals(false);
 }
@@ -719,11 +729,14 @@
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool reallynew = (m_item->pixm.imgInfo.actualPageNumber != imagePageNumber->value());
-	SimpleState *ss = new SimpleState(Um::PageNmbr.arg(static_cast<int>(imagePageNumber->value())),"",Um::IImageFrame);
-	ss->set("IMAGE_NBR","image_nbr");
-	ss->set("OLD",m_item->pixm.imgInfo.actualPageNumber);
-	ss->set("NEW",imagePageNumber->value());
-	UndoManager::instance()->action(m_item,ss);
+	if(UndoManager::undoEnabled())
+	{
+		SimpleState *ss = new SimpleState(Um::PageNmbr.arg(static_cast<int>(imagePageNumber->value())),"",Um::IImageFrame);
+		ss->set("IMAGE_NBR","image_nbr");
+		ss->set("OLD",m_item->pixm.imgInfo.actualPageNumber);
+		ss->set("NEW",imagePageNumber->value());
+		UndoManager::instance()->action(m_item,ss);
+	}
 	m_item->pixm.imgInfo.actualPageNumber = static_cast<int>(imagePageNumber->value());
 	if (reallynew)
 		m_item->loadImage(m_item->externalFile(), true);




More information about the scribus-commit mailing list