r19252 by jghali - #12407: "Translate" Transformation crashes Scribus
scribus-commit
scribus-commit at lists.scribus.net
Wed Jun 18 12:27:07 UTC 2014
Author: jghali
Date: Wed Jun 18 12:27:07 2014
New Revision: 19252
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19252
Log:
#12407: "Translate" Transformation crashes Scribus
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19252&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jun 18 12:27:07 2014
@@ -11099,17 +11099,23 @@
DoDrawing = false;
view()->updatesOn(false);
m_Selection->delaySignalsOn();
- scMW()->setScriptRunning(true);
QTransform comulatedMatrix = matrix;
PageItem *currItem = m_Selection->itemAt(0);
Elements.append(currItem);
int rotBack = RotMode();
RotMode ( 0 );
- scMW()->slotEditCopy();
+ ScriXmlDoc xmlDoc;
+ QString copyBuffer = xmlDoc.WriteElem(this, m_Selection);
view()->Deselect(true);
for (int b = 0; b < nrOfCopies; b++)
{
- scMW()->slotEditPaste();
+ uint ac = Items->count();
+ xmlDoc.ReadElem(copyBuffer, appPrefsData.fontPrefs.AvailFonts, this, currentPage()->xOffset(), currentPage()->yOffset(), false, true, appPrefsData.fontPrefs.GFontSub);
+ for (int as = ac; as < Items->count(); ++as)
+ {
+ PageItem* bItem = Items->at(as);
+ m_Selection->addItem(bItem);
+ }
double gx, gy, gh, gw;
currItem = m_Selection->itemAt(0);
if (m_Selection->count() == 1)
@@ -11182,6 +11188,7 @@
Elements.append(currItem);
}
comulatedMatrix *= matrix;
+ m_Selection->clear();
}
for (int c = 0; c < Elements.count(); ++c)
{
@@ -11195,7 +11202,6 @@
DoDrawing = true;
m_Selection->delaySignalsOff();
view()->updatesOn(true);
- scMW()->setScriptRunning(false);
m_Selection->connectItemToGUI();
}
m_updateManager.setUpdatesEnabled();
More information about the scribus-commit
mailing list