mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-06 07:19:58 +02:00
Fix crash when collapse root item of macro element tree view
Add an icon to the macro type of FileElementCollectionItem. The first time the model (ElementsCollectionModel) ask for decoration role the FileElementCollectionItem check if icon is null, if true the icon is set, if false the function return. In the case of the macro type, befor this commit the macro have a null icon, and so the setIcon is call each time (many) the mouse move hover and cause a qet crash. This commit fix that, only by setUp an icon
This commit is contained in:
@@ -361,7 +361,7 @@ void FileElementCollectionItem::setUpIcon()
|
||||
setIcon(QET::Icons::Folder);
|
||||
} else {
|
||||
if (m_path.endsWith(".qetmak")) {
|
||||
setIcon(QIcon());
|
||||
setIcon(QET::Icons::PartRectangle);
|
||||
} else {
|
||||
ElementsLocation loc(collectionPath());
|
||||
setIcon(loc.icon());
|
||||
|
||||
Reference in New Issue
Block a user