Index: scribus/pageitem.cpp =================================================================== --- scribus/pageitem.cpp (revision 19357) +++ scribus/pageitem.cpp (working copy) @@ -9211,6 +9211,28 @@ return buffer; } +void PageItem::initalizeImageFrame() +{ + oldLocalScX = m_imageXScale = 72.0 / pixm.imgInfo.xres; + oldLocalScY = m_imageYScale = 72.0 / pixm.imgInfo.yres; + oldLocalX = m_imageXOffset = 0; + oldLocalY = m_imageYOffset = 0; + if ((m_Doc->itemToolPrefs().imageUseEmbeddedPath) && (!pixm.imgInfo.clipPath.isEmpty())) + { + pixm.imgInfo.usedPath = pixm.imgInfo.clipPath; + QString clPath(pixm.imgInfo.usedPath); + if (pixm.imgInfo.PDSpathData.contains(clPath)) + { + imageClip = pixm.imgInfo.PDSpathData[clPath].copy(); + pixm.imgInfo.usedPath = clPath; + QTransform cl; + cl.translate(m_imageXOffset*m_imageXScale, m_imageYOffset*m_imageYScale); + cl.scale(m_imageXScale, m_imageYScale); + imageClip.map(cl); + } + } +} + bool PageItem::loadImage(const QString& filename, const bool reload, const int gsResolution, bool showMsg) { bool useImage = (asImageFrame() != NULL); @@ -9218,7 +9240,6 @@ if (!useImage) return false; QFileInfo fi(filename); - QString clPath(pixm.imgInfo.usedPath); pixm.imgInfo.valid = false; pixm.imgInfo.clipPath=""; pixm.imgInfo.PDSpathData.clear(); @@ -9269,34 +9290,23 @@ is->setItem(effectsInUse); undoManager->action(this, is); } - double xres = pixm.imgInfo.xres; - double yres = pixm.imgInfo.yres; PictureIsAvailable = true; // PicArt = true; + /* + // ale: scribus used to reinitialize the image settings when a new image get's loaded. + // this was not a good idea. + // for now, do not initialize any setting. in specific cases, we might want to initiliaze some of the + // settings. we will add it as needed. + // we might also add a way to "manually" reset all the fields to the frame settings values. if (Pfile != filename) { - oldLocalScX = m_imageXScale = 72.0 / xres; - oldLocalScY = m_imageYScale = 72.0 / yres; - oldLocalX = m_imageXOffset = 0; - oldLocalY = m_imageYOffset = 0; - if ((m_Doc->itemToolPrefs().imageUseEmbeddedPath) && (!pixm.imgInfo.clipPath.isEmpty())) - { - pixm.imgInfo.usedPath = pixm.imgInfo.clipPath; - clPath = pixm.imgInfo.clipPath; - if (pixm.imgInfo.PDSpathData.contains(clPath)) - { - imageClip = pixm.imgInfo.PDSpathData[clPath].copy(); - pixm.imgInfo.usedPath = clPath; - QTransform cl; - cl.translate(m_imageXOffset*m_imageXScale, m_imageYOffset*m_imageYScale); - cl.scale(m_imageXScale, m_imageYScale); - imageClip.map(cl); - } - } + initalizeImageFrame(); } + */ Pfile = fi.absoluteFilePath(); + QString clPath(pixm.imgInfo.clipPath); if (reload && pixm.imgInfo.PDSpathData.contains(clPath)) { imageClip = pixm.imgInfo.PDSpathData[clPath].copy();