Skip to content

Commit

Permalink
Update selection details tree view upon module color change
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Nov 7, 2023
1 parent 52edfec commit a4e1b54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -78,6 +79,12 @@ namespace hal
return static_cast<SelectionTreeItem*>(modelIndex.internalPointer());
}

void SelectionTreeView::handleModuleColorChanged(u32 id)
{
Q_UNUSED(id);
update();
}

void SelectionTreeView::handleCustomContextMenuRequested(const QPoint& point)
{
QModelIndex index = indexAt(point);
Expand Down

0 comments on commit a4e1b54

Please sign in to comment.