mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Fix Undo(Ctrl+Z) crash related with conductor frozen label. Prevent freezing blank label in conductor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4686 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1471,10 +1471,13 @@ void Conductor::setProperties(const ConductorProperties &properties)
|
||||
}
|
||||
setText(properties_.text);
|
||||
text_item -> setFontSize(properties_.text_size);
|
||||
|
||||
if (terminal1 != NULL && terminal1->diagram() != NULL) {
|
||||
if (terminal1->diagram()->item_paste)
|
||||
m_frozen_label = "";
|
||||
else
|
||||
m_frozen_label = properties_.text;
|
||||
}
|
||||
if (freeze_label)
|
||||
freezeLabel();
|
||||
if (properties_.type != ConductorProperties::Multi)
|
||||
@@ -1896,5 +1899,6 @@ void Conductor::freezeLabel() {
|
||||
*/
|
||||
void Conductor::unfreezeLabel() {
|
||||
this->setText(m_frozen_label);
|
||||
if (m_frozen_label == "") return;
|
||||
properties_.text = m_frozen_label;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user