minor change, revamp method applyText

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2130 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-04-25 22:32:29 +00:00
parent 44a7911f6e
commit 70beaea9cc

View File

@@ -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 <Conductor *> 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);