┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp5
-rw-r--r--src/dolphintabpage.cpp19
2 files changed, 14 insertions, 10 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index c0446fa4c..ae586bc34 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1008,7 +1008,10 @@ void DolphinMainWindow::tabCountChanged(int count)
void DolphinMainWindow::updateWindowTitle()
{
- setWindowTitle(m_activeViewContainer->caption());
+ const QString newTitle = m_activeViewContainer->caption();
+ if (windowTitle() != newTitle) {
+ setWindowTitle(newTitle);
+ }
}
void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
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());
}