mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user