mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Diagram command : minor imrpovement
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3391 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -160,7 +160,7 @@ PasteDiagramCommand::PasteDiagramCommand(
|
||||
QUndoCommand(parent),
|
||||
content(c),
|
||||
diagram(dia),
|
||||
filter(DiagramContent::Elements|DiagramContent::TextFields|DiagramContent::Images|DiagramContent::ConductorsToMove),
|
||||
filter(DiagramContent::Elements|DiagramContent::TextFields|DiagramContent::Images|DiagramContent::ConductorsToMove | DiagramContent::Shapes),
|
||||
first_redo(true)
|
||||
{
|
||||
|
||||
@@ -353,22 +353,6 @@ void MoveElementsCommand::move(const QPointF &actual_movement) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Ajoute un champ de texte de conducteur a deplacer
|
||||
@param text_item Champ de texte a deplacer
|
||||
@param old_pos Position du champ de texte avant le deplacement
|
||||
@param new_pos Position du champ de texte apres le deplacement
|
||||
*/
|
||||
void MoveElementsCommand::addConductorTextItemMovement(ConductorTextItem *text_item, const QPointF &old_pos, const QPointF &new_pos) {
|
||||
if (moved_conductor_texts_.contains(text_item)) return;
|
||||
if (!text_item -> wasMovedByUser()) return;
|
||||
if (new_pos == old_pos) return;
|
||||
moved_conductor_texts_.insert(
|
||||
text_item,
|
||||
qMakePair(old_pos, new_pos)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MoveElementsCommand::setupAnimation
|
||||
* Set up the animation for this undo command
|
||||
|
||||
Reference in New Issue
Block a user