mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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
This commit is contained in:
parent
d23b842a14
commit
784734ca16
|
@ -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)
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue