From 2d4f9683489a9c6c080a3d4fc0fd29d2e03290a2 Mon Sep 17 00:00:00 2001 From: joshua Date: Wed, 6 May 2026 00:20:07 +0200 Subject: [PATCH] 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 --- sources/ElementsCollection/fileelementcollectionitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/ElementsCollection/fileelementcollectionitem.cpp b/sources/ElementsCollection/fileelementcollectionitem.cpp index 5f42efec4..03a2b71f1 100644 --- a/sources/ElementsCollection/fileelementcollectionitem.cpp +++ b/sources/ElementsCollection/fileelementcollectionitem.cpp @@ -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());