mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 00:30:53 +01:00
QetGraphicsItem, remove the function applyRotation and rotateBy, and use instead the native function of QGraphicsItem : setRotation
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5281 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -78,7 +78,7 @@ void RotateSelectionCommand::undo()
|
||||
|
||||
for(QPointer<Element> elmt : m_element)
|
||||
if(elmt)
|
||||
elmt.data()->rotateBy(-m_angle);
|
||||
elmt.data()->setRotation(elmt.data()->rotation() - m_angle);
|
||||
for(QPointer<DiagramTextItem> text : m_text)
|
||||
{
|
||||
if(text)
|
||||
@@ -98,7 +98,7 @@ void RotateSelectionCommand::undo()
|
||||
}
|
||||
for(QPointer<DiagramImageItem> image : m_image)
|
||||
if(image)
|
||||
image.data()->rotateBy(-m_angle);
|
||||
image.data()->setRotation(image.data()->rotation() - m_angle);
|
||||
for(QPointer<ElementTextItemGroup> group : m_group)
|
||||
if(group)
|
||||
group.data()->setRotation(group.data()->rotation() - m_angle);
|
||||
@@ -113,7 +113,7 @@ void RotateSelectionCommand::redo()
|
||||
|
||||
for(QPointer<Element> elmt : m_element)
|
||||
if(elmt)
|
||||
elmt.data()->rotateBy(m_angle);
|
||||
elmt.data()->setRotation(elmt.data()->rotation() + m_angle);
|
||||
for(QPointer<DiagramTextItem> text : m_text)
|
||||
{
|
||||
if(text)
|
||||
@@ -129,7 +129,7 @@ void RotateSelectionCommand::redo()
|
||||
}
|
||||
for(QPointer<DiagramImageItem> image : m_image)
|
||||
if(image)
|
||||
image.data()->rotateBy(m_angle);
|
||||
image.data()->setRotation(image.data()->rotation() + m_angle);
|
||||
for(QPointer<ElementTextItemGroup> group : m_group)
|
||||
if(group)
|
||||
group.data()->setRotation(group.data()->rotation() + m_angle);
|
||||
|
||||
Reference in New Issue
Block a user