r18367 by jghali - fix several case of loss of image offsets when updating pictures + some refactoring

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 12 21:59:48 UTC 2013


Author: jghali
Date: Fri Jul 12 21:59:48 2013
New Revision: 18367

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18367
Log:
fix several case of loss of image offsets when updating pictures + some refactoring

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

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18367&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Jul 12 21:59:48 2013
@@ -9894,15 +9894,18 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if ((currItem->PictureIsAvailable) && (currItem->Pfile == name))
-			{
-				bool fho = currItem->imageFlippedH();
-				bool fvo = currItem->imageFlippedV();
-				loadPict(currItem->Pfile, currItem, true);
-				currItem->setImageFlippedH(fho);
-				currItem->setImageFlippedV(fvo);
-				updated=true;
-			}
+			if ((!currItem->PictureIsAvailable) || (currItem->Pfile != name))
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			updated=true;
 		}
 		allItems.clear();
 	}
@@ -9916,15 +9919,18 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if ((currItem->PictureIsAvailable) && (currItem->Pfile == name))
-			{
-				bool fho = currItem->imageFlippedH();
-				bool fvo = currItem->imageFlippedV();
-				loadPict(currItem->Pfile, currItem, true);
-				currItem->setImageFlippedH(fho);
-				currItem->setImageFlippedV(fvo);
-				updated=true;
-			}
+			if ((!currItem->PictureIsAvailable) || (currItem->Pfile != name))
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			updated = true;
 		}
 		allItems.clear();
 	}
@@ -9938,15 +9944,18 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if ((currItem->PictureIsAvailable) && (currItem->Pfile == name))
-			{
-				bool fho = currItem->imageFlippedH();
-				bool fvo = currItem->imageFlippedV();
-				loadPict(currItem->Pfile, currItem, true);
-				currItem->setImageFlippedH(fho);
-				currItem->setImageFlippedV(fvo);
-				updated=true;
-			}
+			if ((!currItem->PictureIsAvailable) || (currItem->Pfile != name))
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			updated = true;
 		}
 		allItems.clear();
 	}
@@ -9964,15 +9973,18 @@
 			for (int ii = 0; ii < allItems.count(); ii++)
 			{
 				currItem = allItems.at(ii);
-				if ((currItem->PictureIsAvailable) && (currItem->Pfile == name))
-				{
-					bool fho = currItem->imageFlippedH();
-					bool fvo = currItem->imageFlippedV();
-					loadPict(currItem->Pfile, currItem, true);
-					currItem->setImageFlippedH(fho);
-					currItem->setImageFlippedV(fvo);
-					updated=true;
-				}
+				if ((!currItem->PictureIsAvailable) || (currItem->Pfile != name))
+					continue;
+				bool fho = currItem->imageFlippedH();
+				bool 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);
+				updated = true;
 			}
 			allItems.clear();
 		}
@@ -10011,26 +10023,22 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem->asImageFrame())
-			{
-				if ((!currItem->PictureIsAvailable) && (!currItem->Pfile.isEmpty()))
-				{
-					QFileInfo fi(currItem->Pfile);
-					if (fi.absolutePath() == name)
-					{
-						if (fi.exists())
-						{
-							bool fho = currItem->imageFlippedH();
-							bool fvo = currItem->imageFlippedV();
-							loadPict(currItem->Pfile, currItem, true);
-							currItem->setImageFlippedH(fho);
-							currItem->setImageFlippedV(fvo);
-							ScCore->fileWatcher->addFile(currItem->Pfile);
-							updated=true;
-						}
-					}
-				}
-			}
+			if (!currItem->asImageFrame() || currItem->PictureIsAvailable || currItem->Pfile.isEmpty())
+				continue;
+			QFileInfo fi(currItem->Pfile);
+			if ((fi.absolutePath() != name) || !fi.exists())
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			ScCore->fileWatcher->addFile(currItem->Pfile);
+			updated = true;
 		}
 		allItems.clear();
 	}
@@ -10044,26 +10052,22 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem->asImageFrame())
-			{
-				if ((!currItem->PictureIsAvailable) && (!currItem->Pfile.isEmpty()))
-				{
-					QFileInfo fi(currItem->Pfile);
-					if (fi.absolutePath() == name)
-					{
-						if (fi.exists())
-						{
-							bool fho = currItem->imageFlippedH();
-							bool fvo = currItem->imageFlippedV();
-							loadPict(currItem->Pfile, currItem, true);
-							currItem->setImageFlippedH(fho);
-							currItem->setImageFlippedV(fvo);
-							ScCore->fileWatcher->addFile(currItem->Pfile);
-							updated=true;
-						}
-					}
-				}
-			}
+			if (!currItem->asImageFrame() || currItem->PictureIsAvailable || currItem->Pfile.isEmpty())
+				continue;
+			QFileInfo fi(currItem->Pfile);
+			if ((fi.absolutePath() != name) || !fi.exists())
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			ScCore->fileWatcher->addFile(currItem->Pfile);
+			updated = true;
 		}
 		allItems.clear();
 	}
@@ -10077,26 +10081,22 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem->asImageFrame())
-			{
-				if ((!currItem->PictureIsAvailable) && (!currItem->Pfile.isEmpty()))
-				{
-					QFileInfo fi(currItem->Pfile);
-					if (fi.absolutePath() == name)
-					{
-						if (fi.exists())
-						{
-							bool fho = currItem->imageFlippedH();
-							bool fvo = currItem->imageFlippedV();
-							loadPict(currItem->Pfile, currItem, true);
-							currItem->setImageFlippedH(fho);
-							currItem->setImageFlippedV(fvo);
-							ScCore->fileWatcher->addFile(currItem->Pfile);
-							updated=true;
-						}
-					}
-				}
-			}
+			if (!currItem->asImageFrame() || currItem->PictureIsAvailable || currItem->Pfile.isEmpty())
+				continue;
+			QFileInfo fi(currItem->Pfile);
+			if ((fi.absolutePath() != name) || !fi.exists())
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool 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);
+			ScCore->fileWatcher->addFile(currItem->Pfile);
+			updated = true;
 		}
 		allItems.clear();
 	}
@@ -10114,26 +10114,22 @@
 			for (int ii = 0; ii < allItems.count(); ii++)
 			{
 				currItem = allItems.at(ii);
-				if (currItem->asImageFrame())
-				{
-					if ((!currItem->PictureIsAvailable) && (!currItem->Pfile.isEmpty()))
-					{
-						QFileInfo fi(currItem->Pfile);
-						if (fi.absolutePath() == name)
-						{
-							if (fi.exists())
-							{
-								bool fho = currItem->imageFlippedH();
-								bool fvo = currItem->imageFlippedV();
-								loadPict(currItem->Pfile, currItem, true);
-								currItem->setImageFlippedH(fho);
-								currItem->setImageFlippedV(fvo);
-								ScCore->fileWatcher->addFile(currItem->Pfile);
-								updated=true;
-							}
-						}
-					}
-				}
+				if (!currItem->asImageFrame() || currItem->PictureIsAvailable || currItem->Pfile.isEmpty())
+					continue;
+				QFileInfo fi(currItem->Pfile);
+				if ((fi.absolutePath() != name) || !fi.exists())
+					continue;
+				bool fho = currItem->imageFlippedH();
+				bool 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);
+				ScCore->fileWatcher->addFile(currItem->Pfile);
+				updated = true;
 			}
 			allItems.clear();
 			PageItem *ite = pa.items.at(0);
@@ -10249,10 +10245,120 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem->PictureIsAvailable)
-			{
+			if (!currItem->PictureIsAvailable)
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool fvo = currItem->imageFlippedV();
+			double imgX = currItem->imageXOffset();
+			double imgY = currItem->imageYOffset();
+			if (applyNewRes)
+				currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
+			if (currItem->asLatexFrame())
+				currItem->asLatexFrame()->rerunApplication(false);
+			else
+				loadPict(currItem->Pfile, currItem, true);
+			currItem->setImageFlippedH(fho);
+			currItem->setImageFlippedV(fvo);
+			currItem->setImageXOffset(imgX);
+			currItem->setImageYOffset(imgY);
+			currItem->AdjustPictScale();
+			ca++;
+			m_ScMW->mainWindowProgressBar->setValue(ca);
+			qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+			if (!docPtr) return;
+		}
+		allItems.clear();
+	}
+	for (int a = 0; a < MasterItems.count(); ++a)
+	{
+		PageItem *currItem = MasterItems.at(a);
+		if (currItem->isGroup())
+			allItems = currItem->asGroupFrame()->getItemList();
+		else
+			allItems.append(currItem);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			currItem = allItems.at(ii);
+			if (!currItem->PictureIsAvailable)
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool fvo = currItem->imageFlippedV();
+			double imgX = currItem->imageXOffset();
+			double imgY = currItem->imageYOffset();
+			if (applyNewRes)
+				currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
+			if (currItem->asLatexFrame())
+				currItem->asLatexFrame()->rerunApplication(false);
+			else
+				loadPict(currItem->Pfile, currItem, true);
+			currItem->setImageFlippedH(fho);
+			currItem->setImageFlippedV(fvo);
+			currItem->setImageXOffset(imgX);
+			currItem->setImageYOffset(imgY);
+			currItem->AdjustPictScale();
+			ca++;
+			m_ScMW->mainWindowProgressBar->setValue(ca);
+			qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+			if (!docPtr) return;
+		}
+		allItems.clear();
+	}
+//#endif
+	for (QHash<int, PageItem*>::iterator it = FrameItems.begin(); it != FrameItems.end(); ++it)
+	{
+		PageItem *currItem = it.value();
+		if (currItem->isGroup())
+			allItems = currItem->asGroupFrame()->getItemList();
+		else
+			allItems.append(currItem);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			currItem = allItems.at(ii);
+			if (!currItem->PictureIsAvailable)
+				continue;
+			bool fho = currItem->imageFlippedH();
+			bool fvo = currItem->imageFlippedV();
+			double imgX = currItem->imageXOffset();
+			double imgY = currItem->imageYOffset();
+			if (applyNewRes)
+				currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
+			if (currItem->asLatexFrame())
+				currItem->asLatexFrame()->rerunApplication(false);
+			else
+				loadPict(currItem->Pfile, currItem, true);
+			currItem->setImageFlippedH(fho);
+			currItem->setImageFlippedV(fvo);
+			currItem->setImageXOffset(imgX);
+			currItem->setImageYOffset(imgY);
+			currItem->AdjustPictScale();
+			ca++;
+			m_ScMW->mainWindowProgressBar->setValue(ca);
+			qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+			if (!docPtr) return;
+		}
+		allItems.clear();
+	}
+	for (int c = 0; c < patterns.count(); ++c)
+	{
+		ScPattern pa = docPatterns[patterns[c]];
+		if (pa.items.count() <= 0)
+			continue;
+		for (int o = 0; o < pa.items.count(); o++)
+		{
+			PageItem *currItem = pa.items.at(o);
+			if (currItem->isGroup())
+				allItems = currItem->asGroupFrame()->getItemList();
+			else
+				allItems.append(currItem);
+			for (int ii = 0; ii < allItems.count(); ii++)
+			{
+				currItem = allItems.at(ii);
+				if (!currItem->PictureIsAvailable)
+					continue;
 				bool fho = currItem->imageFlippedH();
 				bool fvo = currItem->imageFlippedV();
+				double imgX = currItem->imageXOffset();
+				double imgY = currItem->imageYOffset();
 				if (applyNewRes)
 					currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
 				if (currItem->asLatexFrame())
@@ -10261,111 +10367,13 @@
 					loadPict(currItem->Pfile, currItem, true);
 				currItem->setImageFlippedH(fho);
 				currItem->setImageFlippedV(fvo);
+				currItem->setImageXOffset(imgX);
+				currItem->setImageYOffset(imgY);
 				currItem->AdjustPictScale();
 				ca++;
 				m_ScMW->mainWindowProgressBar->setValue(ca);
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 				if (!docPtr) return;
-			}
-		}
-		allItems.clear();
-	}
-	for (int a = 0; a < MasterItems.count(); ++a)
-	{
-		PageItem *currItem = MasterItems.at(a);
-		if (currItem->isGroup())
-			allItems = currItem->asGroupFrame()->getItemList();
-		else
-			allItems.append(currItem);
-		for (int ii = 0; ii < allItems.count(); ii++)
-		{
-			currItem = allItems.at(ii);
-			if (currItem->PictureIsAvailable)
-			{
-				bool fho = currItem->imageFlippedH();
-				bool fvo = currItem->imageFlippedV();
-				if (applyNewRes)
-					currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
-				if (currItem->asLatexFrame())
-					currItem->asLatexFrame()->rerunApplication(false);
-				else
-					loadPict(currItem->Pfile, currItem, true);
-				currItem->setImageFlippedH(fho);
-				currItem->setImageFlippedV(fvo);
-				currItem->AdjustPictScale();
-				ca++;
-				m_ScMW->mainWindowProgressBar->setValue(ca);
-				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-				if (!docPtr) return;
-			}
-		}
-		allItems.clear();
-	}
-//#endif
-	for (QHash<int, PageItem*>::iterator it = FrameItems.begin(); it != FrameItems.end(); ++it)
-	{
-		PageItem *currItem = it.value();
-		if (currItem->isGroup())
-			allItems = currItem->asGroupFrame()->getItemList();
-		else
-			allItems.append(currItem);
-		for (int ii = 0; ii < allItems.count(); ii++)
-		{
-			currItem = allItems.at(ii);
-			if (currItem->PictureIsAvailable)
-			{
-				bool fho = currItem->imageFlippedH();
-				bool fvo = currItem->imageFlippedV();
-				if (applyNewRes)
-					currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
-				if (currItem->asLatexFrame())
-					currItem->asLatexFrame()->rerunApplication(false);
-				else
-					loadPict(currItem->Pfile, currItem, true);
-				currItem->setImageFlippedH(fho);
-				currItem->setImageFlippedV(fvo);
-				currItem->AdjustPictScale();
-				ca++;
-				m_ScMW->mainWindowProgressBar->setValue(ca);
-				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-				if (!docPtr) return;
-			}
-		}
-		allItems.clear();
-	}
-	for (int c = 0; c < patterns.count(); ++c)
-	{
-		ScPattern pa = docPatterns[patterns[c]];
-		if (pa.items.count() <= 0)
-			continue;
-		for (int o = 0; o < pa.items.count(); o++)
-		{
-			PageItem *currItem = pa.items.at(o);
-			if (currItem->isGroup())
-				allItems = currItem->asGroupFrame()->getItemList();
-			else
-				allItems.append(currItem);
-			for (int ii = 0; ii < allItems.count(); ii++)
-			{
-				currItem = allItems.at(ii);
-				if (currItem->PictureIsAvailable)
-				{
-					bool fho = currItem->imageFlippedH();
-					bool fvo = currItem->imageFlippedV();
-					if (applyNewRes)
-						currItem->pixm.imgInfo.lowResType = docPrefsData.itemToolPrefs.imageLowResType;
-					if (currItem->asLatexFrame())
-						currItem->asLatexFrame()->rerunApplication(false);
-					else
-						loadPict(currItem->Pfile, currItem, true);
-					currItem->setImageFlippedH(fho);
-					currItem->setImageFlippedV(fvo);
-					currItem->AdjustPictScale();
-					ca++;
-					m_ScMW->mainWindowProgressBar->setValue(ca);
-					qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-					if (!docPtr) return;
-				}
 			}
 			allItems.clear();
 		}

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18367&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Fri Jul 12 21:59:48 2013
@@ -133,7 +133,6 @@
 #include "loadsaveplugin.h"
 #include "fileloader.h"
 #include "plugins/formatidlist.h"
-#include <tiffio.h>
 
 using namespace std;
 
@@ -2926,22 +2925,21 @@
 				for (uint a = 0; a < pageFromMasterCount; ++a)
 				{
 					currItem = page->FromMaster.at(a);
-					if (currItem->asImageFrame())
-					{
-						if (currItem->PictureIsAvailable)
-						{
-							if (currItem->pixm.imgInfo.lowResType != 0)
-							{
-								changedList.append(qMakePair(currItem, currItem->pixm.imgInfo.lowResType));
-								currItem->pixm.imgInfo.lowResType = 0;
-								int fho = currItem->imageFlippedH();
-								int fvo = currItem->imageFlippedV();
-								Doc->loadPict(currItem->Pfile, currItem, true);
-								currItem->setImageFlippedH(fho);
-								currItem->setImageFlippedV(fvo);
-							}
-						}
-					}
+					if (!currItem->asImageFrame() || !currItem->PictureIsAvailable)
+						continue;
+					if (currItem->pixm.imgInfo.lowResType == 0)
+						continue;
+					changedList.append(qMakePair(currItem, currItem->pixm.imgInfo.lowResType));
+					currItem->pixm.imgInfo.lowResType = 0;
+					int fho = currItem->imageFlippedH();
+					int fvo = currItem->imageFlippedV();
+					double imgX = currItem->imageXOffset();
+					double imgY = currItem->imageYOffset();
+					Doc->loadPict(currItem->Pfile, currItem, true);
+					currItem->setImageFlippedH(fho);
+					currItem->setImageFlippedV(fvo);
+					currItem->setImageXOffset(imgX);
+					currItem->setImageYOffset(imgY);
 				}
 			}
 			if (Doc->Items->count() != 0)
@@ -2951,25 +2949,23 @@
 				for (int it = 0; it < Doc->Items->count(); ++it)
 				{
 					currItem = Doc->Items->at(it);
-					if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
-					{
-						if (currItem->asImageFrame())
-						{
-							if (currItem->PictureIsAvailable)
-							{
-								if (currItem->pixm.imgInfo.lowResType != 0)
-								{
-									changedList.append(qMakePair(currItem, currItem->pixm.imgInfo.lowResType));
-									currItem->pixm.imgInfo.lowResType = 0;
-									int fho = currItem->imageFlippedH();
-									int fvo = currItem->imageFlippedV();
-									Doc->loadPict(currItem->Pfile, currItem, true);
-									currItem->setImageFlippedH(fho);
-									currItem->setImageFlippedV(fvo);
-								}
-							}
-						}
-					}
+					if (!cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+						continue;
+					if (!currItem->asImageFrame() || !currItem->PictureIsAvailable)
+						continue;
+					if (currItem->pixm.imgInfo.lowResType == 0)
+						continue;
+					changedList.append(qMakePair(currItem, currItem->pixm.imgInfo.lowResType));
+					currItem->pixm.imgInfo.lowResType = 0;
+					int fho = currItem->imageFlippedH();
+					int fvo = currItem->imageFlippedV();
+					double imgX = currItem->imageXOffset();
+					double imgY = currItem->imageYOffset();
+					Doc->loadPict(currItem->Pfile, currItem, true);
+					currItem->setImageFlippedH(fho);
+					currItem->setImageFlippedV(fvo);
+					currItem->setImageXOffset(imgX);
+					currItem->setImageYOffset(imgY);
 				}
 			}
 
@@ -2998,9 +2994,13 @@
 					currItem->pixm.imgInfo.lowResType = itemPair.second;
 					int fho = currItem->imageFlippedH();
 					int fvo = currItem->imageFlippedV();
+					double imgX = currItem->imageXOffset();
+					double imgY = currItem->imageYOffset();
 					Doc->loadPict(currItem->Pfile, currItem, true);
 					currItem->setImageFlippedH(fho);
 					currItem->setImageFlippedV(fvo);
+					currItem->setImageXOffset(imgX);
+					currItem->setImageYOffset(imgY);
 				}
 			}
 




More information about the scribus-commit mailing list