r22919 by jghali - Prevent creation of spurious rotation undo actions
scribus-commit
scribus-commit at lists.scribus.net
Fri Mar 29 22:24:00 UTC 2019
Author: jghali
Date: Fri Mar 29 22:24:00 2019
New Revision: 22919
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22919
Log:
Prevent creation of spurious rotation undo actions
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22919&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Fri Mar 29 22:24:00 2019
@@ -457,6 +457,7 @@
currItem->setLineShade(Buffer->Shade2);
currItem->fillRule = Buffer->FillRule;
currItem->setRotation(Buffer->Rot);
+ currItem->oldRot = currItem->rotation();
currItem->setTextToFrameDist(Buffer->Extra, Buffer->RExtra, Buffer->TExtra, Buffer->BExtra);
currItem->PLineArt = Qt::PenStyle(Buffer->PLineArt);
currItem->PLineEnd = Qt::PenCapStyle(Buffer->PLineEnd);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22919&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 Fri Mar 29 22:24:00 2019
@@ -667,6 +667,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -698,6 +699,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
}
@@ -728,6 +730,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->MasterItems.removeOne(cItem);
}
@@ -2244,6 +2247,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -2790,6 +2794,7 @@
}
currItem->setRotation( attrs.valueAsDouble("ROT") );
+ currItem->oldRot = currItem->rotation();
currItem->setTextToFrameDist(attrs.valueAsDouble("EXTRA"),
attrs.valueAsDouble("REXTRA", 1.0),
attrs.valueAsDouble("TEXTRA", 1.0),
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22919&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 Fri Mar 29 22:24:00 2019
@@ -1750,6 +1750,7 @@
currItem->itemText.setDefaultStyle(pstyle);
currItem->setRotation(ScCLocale::toDoubleC(obj->attribute("ROT")));
+ currItem->oldRot = currItem->rotation();
currItem->setTextToFrameDist(ScCLocale::toDoubleC(obj->attribute("EXTRA")),
ScCLocale::toDoubleC(obj->attribute("REXTRA"), 1.0),
ScCLocale::toDoubleC(obj->attribute("TEXTRA"), 1.0),
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22919&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 Fri Mar 29 22:24:00 2019
@@ -598,6 +598,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -628,6 +629,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
}
@@ -658,6 +660,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->MasterItems.removeOne(cItem);
}
@@ -1119,6 +1122,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -1151,6 +1155,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
}
@@ -1183,6 +1188,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->MasterItems.removeOne(cItem);
}
@@ -1836,6 +1842,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -1868,6 +1875,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
}
@@ -1900,6 +1908,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->MasterItems.removeOne(cItem);
}
@@ -4432,6 +4441,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -5151,6 +5161,7 @@
}
}
currItem->setRotation( attrs.valueAsDouble("ROT", 0.0) );
+ currItem->oldRot = currItem->rotation();
currItem->setTextToFrameDist(attrs.valueAsDouble("EXTRA", 0.0),
attrs.valueAsDouble("REXTRA", 0.0),
attrs.valueAsDouble("TEXTRA", 0.0),
@@ -6525,6 +6536,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->DocItems.removeOne(cItem);
}
@@ -6557,6 +6569,7 @@
cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
cItem->setRotation(cItem->rotation() - gItem->rotation());
+ cItem->oldRot = cItem->rotation();
}
m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
}
More information about the scribus-commit
mailing list