mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 10:30:53 +01:00
Conductor :
Use method toXml and fromXml of sequentialNumbers. Use m_freeze_label instead of m_frozen_label to save the frozen status of the text item. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4807 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -868,10 +868,6 @@ bool Diagram::fromXml(QDomElement &document, QPointF position, bool consider_inf
|
||||
addItem(c);
|
||||
c -> fromXml(f);
|
||||
added_conductors << c;
|
||||
if (item_paste) {
|
||||
c->m_frozen_label = f.attribute("frozenlabel");
|
||||
qDebug() << "Frozen Label" << f.attribute("frozenlabel");
|
||||
}
|
||||
}
|
||||
else
|
||||
delete c;
|
||||
@@ -1489,19 +1485,9 @@ bool Diagram::freezeNewElements() {
|
||||
* @brief Diagram::freezeConductors
|
||||
* Freeze every existent conductor label.
|
||||
*/
|
||||
void Diagram::freezeConductors() {
|
||||
void Diagram::freezeConductors(bool freeze) {
|
||||
foreach (Conductor *cnd, conductors()) {
|
||||
cnd->setFreezeLabel(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Diagram::unfreezeConductors
|
||||
* Unfreeze every existent conductor label.
|
||||
*/
|
||||
void Diagram::unfreezeConductors() {
|
||||
foreach (Conductor *cnd, conductors()) {
|
||||
cnd->setFreezeLabel(false);
|
||||
cnd->setFreezeLabel(freeze);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user