mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 04:30:35 +01:00
fix [diagram editor] : fix crash on search and replace widget
Qet crash when double click on an element/text/conductor in the tree widget of the search and replace widget and the item is deleted from diagram. (Call of Diagram::showme to a nullptr).
This commit is contained in:
@@ -961,21 +961,21 @@ void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(
|
||||
else if (m_element_hash.keys().contains(item))
|
||||
{
|
||||
QPointer<Element> elmt = m_element_hash.value(item);
|
||||
if (elmt) {
|
||||
if (elmt && elmt->diagram()) {
|
||||
elmt.data()->diagram()->showMe();
|
||||
}
|
||||
}
|
||||
else if (m_text_hash.keys().contains(item))
|
||||
{
|
||||
QPointer<IndependentTextItem> text = m_text_hash.value(item);
|
||||
if (text) {
|
||||
if (text && text->diagram()) {
|
||||
text.data()->diagram()->showMe();
|
||||
}
|
||||
}
|
||||
else if (m_conductor_hash.keys().contains(item))
|
||||
{
|
||||
QPointer<Conductor> cond = m_conductor_hash.value(item);
|
||||
if (cond) {
|
||||
if (cond && cond->diagram()) {
|
||||
cond.data()->diagram()->showMe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user