From 70beaea9cc051b508fe6a95aa5ac5901e23b4ef7 Mon Sep 17 00:00:00 2001 From: blacksun Date: Thu, 25 Apr 2013 22:32:29 +0000 Subject: [PATCH] minor change, revamp method applyText git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2130 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/conductorautonumerotation.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sources/conductorautonumerotation.cpp b/sources/conductorautonumerotation.cpp index 70b1feedd..9d6e114e1 100644 --- a/sources/conductorautonumerotation.cpp +++ b/sources/conductorautonumerotation.cpp @@ -92,14 +92,11 @@ void ConductorAutoNumerotation::applyText(QString t) { if (conductor_list.empty()) { //initialize the corresponding UndoCommand object ChangeConductorPropertiesCommand *ccpc = new ChangeConductorPropertiesCommand (conductor_); - ConductorProperties cp; - cp = conductor_ ->properties(); - ccpc -> setOldSettings(cp); + ccpc -> setOldSettings (conductor_ -> properties()); + ConductorProperties cp = conductor_ -> properties(); cp.text = t; ccpc -> setNewSettings(cp); diagram_ -> undoStack().push(ccpc); - conductor_ -> setProperties(cp); - conductor_ -> setText(t); } else { QSet clist = conductor_list; @@ -111,9 +108,7 @@ void ConductorAutoNumerotation::applyText(QString t) { old_properties << c -> properties(); cp = c -> properties(); cp.text = t; - c -> setProperties(cp); - new_properties << c -> properties(); - c -> setText(t); + new_properties << cp; } //initialize the corresponding UndoCommand object ChangeSeveralConductorsPropertiesCommand *cscpc = new ChangeSeveralConductorsPropertiesCommand(clist);