From f88cea8847afff9141a1204eed0806bea21eaca0 Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Thu, 4 Aug 2016 12:29:35 +0000 Subject: [PATCH] Improve latest commit : add reset the text of conductors if checkbox save_label isn't checked git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4602 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagramcommands.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/diagramcommands.cpp b/sources/diagramcommands.cpp index efb28045a..91b748b4c 100644 --- a/sources/diagramcommands.cpp +++ b/sources/diagramcommands.cpp @@ -203,15 +203,15 @@ void PasteDiagramCommand::redo() //Reset the text field tagged "label if (ElementTextItem *eti = e ->taggedText("label")) eti -> setPlainText("_"); + + //Reset the text of conductors + foreach (Conductor *c, content.conductorsToMove) { + ConductorProperties cp = c -> properties(); + cp.text = c->diagram() ? c -> diagram() -> defaultConductorProperties.text : "_"; + c -> setProperties(cp); } } - - //Reset the text of conductors - foreach (Conductor *c, content.conductorsToMove) { - ConductorProperties cp = c -> properties(); - cp.text = c->diagram() ? c -> diagram() -> defaultConductorProperties.text : "_"; - c -> setProperties(cp); - } +} } else { foreach (QGraphicsItem *item, content.items(filter)) {