timebasedpanel: check if node is the same

Minor optimization.
This commit is contained in:
itsmattkc
2020-06-22 00:40:19 +10:00
parent 6ebcb7162e
commit 1ec0d06e9f
+4
View File
@@ -125,6 +125,10 @@ TimeRuler *TimeBasedPanel::ruler() const
void TimeBasedPanel::ConnectViewerNode(ViewerOutput *node)
{
if (widget_->GetConnectedNode() == node) {
return;
}
if (widget_->GetConnectedNode()) {
disconnect(widget_->GetConnectedNode(), &ViewerOutput::MediaNameChanged, this, &TimeBasedPanel::SetSubtitle);
}