mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
clean some code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5279 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "diagramimageitem.h"
|
||||
#include "diagram.h"
|
||||
#include "conductor.h"
|
||||
#include "qet.h"
|
||||
|
||||
#include <QGraphicsItem>
|
||||
|
||||
@@ -87,12 +88,12 @@ void RotateSelectionCommand::undo()
|
||||
ConductorTextItem *cti = static_cast<ConductorTextItem *>(text.data());
|
||||
cti->forceRotateByUser(m_rotate_by_user.value(text.data()));
|
||||
if(cti->wasRotateByUser())
|
||||
cti->rotateBy(-m_angle);
|
||||
cti->setRotation(cti->rotation() - m_angle);
|
||||
else
|
||||
cti->parentConductor()->calculateTextItemPosition();
|
||||
}
|
||||
else
|
||||
text.data()->rotateBy(-m_angle);
|
||||
text.data()->setRotation(text.data()->rotation() - m_angle);
|
||||
}
|
||||
}
|
||||
for(QPointer<DiagramImageItem> image : m_image)
|
||||
@@ -123,7 +124,7 @@ void RotateSelectionCommand::redo()
|
||||
m_rotate_by_user.insert(text.data(), cti->wasRotateByUser());
|
||||
cti->forceRotateByUser(true);
|
||||
}
|
||||
text.data()->rotateBy(m_angle);
|
||||
text.data()->setRotation(text.data()->rotation() + m_angle);
|
||||
}
|
||||
}
|
||||
for(QPointer<DiagramImageItem> image : m_image)
|
||||
|
||||
Reference in New Issue
Block a user