mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
when model is not yet loaded, but the element editor should be opened, a segmentation fault occurs. Do not set current index when m_model is not yet loaded
This commit is contained in:
committed by
Laurent Trinques
parent
4a3b7e708a
commit
d1742d5685
@@ -123,7 +123,8 @@ void ElementsCollectionWidget::setCurrentLocation(const ElementsLocation &locati
|
||||
if (!location.exist())
|
||||
return;
|
||||
|
||||
m_tree_view->setCurrentIndex(m_model->indexFromLocation(location));
|
||||
if (m_model)
|
||||
m_tree_view->setCurrentIndex(m_model->indexFromLocation(location));
|
||||
}
|
||||
|
||||
void ElementsCollectionWidget::leaveEvent(QEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user