Bug fix: element text item move strange when element is rotated. (my apologies for this weird bug)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3399 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-10-25 21:21:52 +00:00
parent bd76d66b31
commit 3cf0f0f929
13 changed files with 429 additions and 40 deletions

View File

@@ -177,6 +177,33 @@ class MoveElementsCommand : public QUndoCommand {
bool first_redo;
};
class MoveElementsTextsCommand : public QUndoCommand {
// constructors, destructor
public:
MoveElementsTextsCommand(Diagram *, const QSet<ElementTextItem *> &, const QPointF &m, QUndoCommand * = 0);
virtual ~MoveElementsTextsCommand();
private:
MoveElementsTextsCommand(const MoveElementsTextsCommand &);
// methods
public:
virtual void undo();
virtual void redo();
virtual void move(const QPointF &);
// attributes
private:
/// diagram the movement takes place on.
Diagram *diagram;
/// text items to be moved
QSet<ElementTextItem *> texts_to_move;
/// applied movement
QPointF movement;
/// prevent the first call to redo()
bool first_redo;
};
/**
This command moves text items related to conductors on a particular
diagram.