r18344 by jghali - #11614: Modifying image display quality setting change image offset

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 26 21:52:46 UTC 2013


Author: jghali
Date: Wed Jun 26 21:52:46 2013
New Revision: 18344

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18344
Log:
#11614: Modifying image display quality setting change image offset

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18344&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jun 26 21:52:46 2013
@@ -10490,33 +10490,37 @@
 		bool toUpdate=false;
 		for (uint i = 0; i < docSelectionCount; ++i)
 		{
-			if (m_Selection->itemAt(i)!=NULL)
-			{
-				if (m_Selection->itemAt(i)->asLatexFrame())
+			PageItem* currItem = m_Selection->itemAt(i);
+			if (!currItem)
+				continue;
+			m_updateManager.setUpdatesDisabled();
+			if (currItem->asLatexFrame())
+			{
+				PageItem_LatexFrame *latexframe = currItem->asLatexFrame();
+				latexframe->rerunApplication();
+				toUpdate = true;
+			}
+#ifdef HAVE_OSG
+			else if ((currItem->asImageFrame()) || (currItem->asOSGFrame()))
+#else
+			else if (currItem->asImageFrame())
+#endif
+			{
+				if (currItem->PictureIsAvailable)
 				{
-					PageItem_LatexFrame *latexframe =
-						m_Selection->itemAt(i)->asLatexFrame();
-					latexframe->rerunApplication();
+					int fho = currItem->imageFlippedH();
+					int fvo = currItem->imageFlippedV();
+					double imgX = currItem->imageXOffset();
+					double imgY = currItem->imageYOffset();
+					loadPict(currItem->Pfile, currItem, true);
+					currItem->setImageFlippedH(fho);
+					currItem->setImageFlippedV(fvo);
+					currItem->setImageXOffset(imgX);
+					currItem->setImageYOffset(imgY);
 					toUpdate = true;
 				}
-#ifdef HAVE_OSG
-				else if ((m_Selection->itemAt(i)->asImageFrame()) || (m_Selection->itemAt(i)->asOSGFrame()))
-#else
-				else if (m_Selection->itemAt(i)->asImageFrame())
-#endif
-				{
-					PageItem *currItem = m_Selection->itemAt(i);
-					if (currItem->PictureIsAvailable)
-					{
-						int fho = currItem->imageFlippedH();
-						int fvo = currItem->imageFlippedV();
-						loadPict(currItem->Pfile, currItem, true);
-						currItem->setImageFlippedH(fho);
-						currItem->setImageFlippedV(fvo);
-						toUpdate=true;
-					}
-				}
-			}
+			}
+			m_updateManager.setUpdatesEnabled();
 		}
 		if (toUpdate)
 			regionsChanged()->update(QRectF());
@@ -11181,13 +11185,10 @@
 		for (uint i = 0; i < selectedItemCount; ++i)
 		{
 			currItem = m_Selection->itemAt(i);
-			if (currItem!=NULL)
-				if (currItem->asImageFrame())
-				{
-					currItem->setResolution(id);
-					if (!found)
-						found=true;
-				}
+			if (!currItem || !currItem->isImageFrame())
+				continue;
+			currItem->setResolution(id);
+			found = true;
 		}
 		if(activeTransaction)
 		{




More information about the scribus-commit mailing list