mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-07 20:34:14 +02:00
Merge pull request #980 from ispyisail/scripting-api-feature-complete
Scripting API: make it feature-complete, sync misc/qet-mcp
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
#include "conductorcreator.h"
|
||||
|
||||
#include "../conductorautonumerotation.h"
|
||||
#include "../dataBase/projectdatabase.h"
|
||||
#include "../diagram.h"
|
||||
#include "../qetproject.h"
|
||||
#include "../undocommand/addgraphicsobjectcommand.h"
|
||||
#include "../qetgraphicsitem/conductor.h"
|
||||
#include "../qetgraphicsitem/element.h"
|
||||
@@ -68,6 +70,15 @@ ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list)
|
||||
|
||||
for(Conductor *c : c_list) {
|
||||
c->refreshText();
|
||||
//refreshText() resolves an auto-numbering formula into
|
||||
//properties.text without emitting propertiesChange, which is
|
||||
//what the project database listens to. The row was inserted
|
||||
//while text was still the raw formula ("W%sequ_1"), so without
|
||||
//this the wiring list and BOM read the formula, not "W1",
|
||||
//until something forces a full rebuild.
|
||||
if (d->project() && d->project()->dataBase()) {
|
||||
d->project()->dataBase()->updateConductor(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user