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()) {
|
if (conductor_list.empty()) {
|
||||||
//initialize the corresponding UndoCommand object
|
//initialize the corresponding UndoCommand object
|
||||||
ChangeConductorPropertiesCommand *ccpc = new ChangeConductorPropertiesCommand (conductor_);
|
ChangeConductorPropertiesCommand *ccpc = new ChangeConductorPropertiesCommand (conductor_);
|
||||||
ConductorProperties cp;
|
ccpc -> setOldSettings (conductor_ -> properties());
|
||||||
cp = conductor_ ->properties();
|
ConductorProperties cp = conductor_ -> properties();
|
||||||
ccpc -> setOldSettings(cp);
|
|
||||||
cp.text = t;
|
cp.text = t;
|
||||||
ccpc -> setNewSettings(cp);
|
ccpc -> setNewSettings(cp);
|
||||||
diagram_ -> undoStack().push(ccpc);
|
diagram_ -> undoStack().push(ccpc);
|
||||||
conductor_ -> setProperties(cp);
|
|
||||||
conductor_ -> setText(t);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QSet <Conductor *> clist = conductor_list;
|
QSet <Conductor *> clist = conductor_list;
|
||||||
@@ -111,9 +108,7 @@ void ConductorAutoNumerotation::applyText(QString t) {
|
|||||||
old_properties << c -> properties();
|
old_properties << c -> properties();
|
||||||
cp = c -> properties();
|
cp = c -> properties();
|
||||||
cp.text = t;
|
cp.text = t;
|
||||||
c -> setProperties(cp);
|
new_properties << cp;
|
||||||
new_properties << c -> properties();
|
|
||||||
c -> setText(t);
|
|
||||||
}
|
}
|
||||||
//initialize the corresponding UndoCommand object
|
//initialize the corresponding UndoCommand object
|
||||||
ChangeSeveralConductorsPropertiesCommand *cscpc = new ChangeSeveralConductorsPropertiesCommand(clist);
|
ChangeSeveralConductorsPropertiesCommand *cscpc = new ChangeSeveralConductorsPropertiesCommand(clist);
|
||||||
|
|||||||
Reference in New Issue
Block a user