From 784734ca16803f5109e6268d1afc6c4f33d41def Mon Sep 17 00:00:00 2001 From: Chris Rizzitello Date: Sun, 13 Jan 2019 20:55:07 -0500 Subject: Abort updateWindowTitle and activeViewChanged if not changed. Summary: - Prevent activeViewChanged from updating the window if the view is the same view (happens at least once when starting up) - Stop updateWindowTitle from updating the title if its not changed. Reviewers: #dolphin, elvisangelaccio, broulik Reviewed By: #dolphin, elvisangelaccio, broulik Subscribers: anthonyfieroni, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17882 --- src/dolphintabpage.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/dolphintabpage.cpp') diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 91fc7cfd8..0193aaad0 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -320,17 +320,18 @@ void DolphinTabPage::slotViewActivated() const DolphinView* newActiveView = activeViewContainer()->view(); - if (newActiveView != oldActiveView) { - disconnect(oldActiveView, &DolphinView::urlChanged, - this, &DolphinTabPage::activeViewUrlChanged); - disconnect(oldActiveView, &DolphinView::redirection, - this, &DolphinTabPage::slotViewUrlRedirection); - connect(newActiveView, &DolphinView::urlChanged, - this, &DolphinTabPage::activeViewUrlChanged); - connect(newActiveView, &DolphinView::redirection, - this, &DolphinTabPage::slotViewUrlRedirection); + if (newActiveView == oldActiveView) { + return; } + disconnect(oldActiveView, &DolphinView::urlChanged, + this, &DolphinTabPage::activeViewUrlChanged); + disconnect(oldActiveView, &DolphinView::redirection, + this, &DolphinTabPage::slotViewUrlRedirection); + connect(newActiveView, &DolphinView::urlChanged, + this, &DolphinTabPage::activeViewUrlChanged); + connect(newActiveView, &DolphinView::redirection, + this, &DolphinTabPage::slotViewUrlRedirection); emit activeViewChanged(activeViewContainer()); emit activeViewUrlChanged(activeViewContainer()->url()); } -- cgit v1.3