Minor : avoid unnecessary multiple function call

TerminalStripTreeDockWidget::on_m_tree_view_currentItemChanged
call setCurrentStrip only when current strip changed, and not every time
when user click in another item on the tree view.
This commit is contained in:
joshua
2022-03-30 20:30:57 +02:00
parent c4b0c1435c
commit a38d97896d

View File

@@ -182,7 +182,10 @@ void TerminalStripTreeDockWidget::on_m_tree_view_currentItemChanged(QTreeWidgetI
&& current->parent()->type() == TerminalStripTreeWidget::Strip) {
strip_ = m_item_strip_H.value(current->parent());
}
setCurrentStrip(strip_);
if (strip_ != m_current_strip) {
setCurrentStrip(strip_);
}
}
/**