diff --git a/plugins/gui/include/gui/selection_details_widget/tree_navigation/selection_tree_view.h b/plugins/gui/include/gui/selection_details_widget/tree_navigation/selection_tree_view.h index c677f114f54..8dd7c85eae8 100644 --- a/plugins/gui/include/gui/selection_details_widget/tree_navigation/selection_tree_view.h +++ b/plugins/gui/include/gui/selection_details_widget/tree_navigation/selection_tree_view.h @@ -79,6 +79,12 @@ namespace hal * @param filter_text -The text to filter the model. */ void handleFilterTextChanged(const QString& filter_text); + + /** + * Might have to change icon color if module selected, thus updating view upon this event + * @param id - unused + */ + void handleModuleColorChanged(u32 id); protected: /** diff --git a/plugins/gui/src/selection_details_widget/tree_navigation/selection_tree_view.cpp b/plugins/gui/src/selection_details_widget/tree_navigation/selection_tree_view.cpp index cfc1959ca84..4eeeaec0afe 100644 --- a/plugins/gui/src/selection_details_widget/tree_navigation/selection_tree_view.cpp +++ b/plugins/gui/src/selection_details_widget/tree_navigation/selection_tree_view.cpp @@ -33,6 +33,7 @@ namespace hal connect(this, &SelectionTreeView::itemDoubleClicked, this, &SelectionTreeView::handleTreeViewItemFocusClicked); connect(this, &SelectionTreeView::focusItemClicked, this, &SelectionTreeView::handleTreeViewItemFocusClicked); + connect(gNetlistRelay->getModuleColorManager(),&ModuleColorManager::moduleColorChanged,this,&SelectionTreeView::handleModuleColorChanged); } void SelectionTreeView::setDefaultColumnWidth() @@ -78,6 +79,12 @@ namespace hal return static_cast(modelIndex.internalPointer()); } + void SelectionTreeView::handleModuleColorChanged(u32 id) + { + Q_UNUSED(id); + update(); + } + void SelectionTreeView::handleCustomContextMenuRequested(const QPoint& point) { QModelIndex index = indexAt(point);