forked from qt-creator/qt-creator
QmlDesigner: Fix Component Library category collapsed state
Set category collapsed state only after checking the status of category and not during it. Fixes: QDS-4227 Change-Id: I4771a8641174ac2f0413b3ff2380dd8dbb77742f Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -375,10 +375,10 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
|
||||
if (!categorySection) {
|
||||
categorySection = new ItemLibraryCategory(catName, importSection);
|
||||
importSection->addCategory(categorySection);
|
||||
if (importSection->sectionType() == ItemLibraryImport::SectionType::Default
|
||||
&& !importSection->hasSingleCategory()) {
|
||||
categorySection->setExpanded(loadExpandedState(categorySection->categoryName()));
|
||||
}
|
||||
}
|
||||
if (importSection->sectionType() == ItemLibraryImport::SectionType::Default
|
||||
&& !importSection->hasSingleCategory()) {
|
||||
categorySection->setExpanded(loadExpandedState(categorySection->categoryName()));
|
||||
}
|
||||
|
||||
// create item
|
||||
|
||||
Reference in New Issue
Block a user