]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.cpp
React on the redirection signal from DolphinView to properly update the tab and windo...
[dolphin.git] / src / dolphintabwidget.cpp
index ea71b48566c4feb1d1589d2f5c50480aeb66360d..76d4b8d48d48b49a7d1f4585d53d95c3e667992b 100644 (file)
@@ -295,12 +295,19 @@ void DolphinTabWidget::tabUrlChanged(const KUrl& url)
     if (index >= 0) {
         tabBar()->setTabText(index, tabName(url));
         tabBar()->setTabIcon(index, KIcon(KMimeType::iconNameForUrl(url)));
+
+        // Emit the currentUrlChanged signal if the url of the current tab has been changed.
+        if (index == currentIndex()) {
+            emit currentUrlChanged(url);
+        }
     }
 }
 
 void DolphinTabWidget::currentTabChanged(int index)
 {
-    emit activeViewChanged(tabPageAt(index)->activeViewContainer());
+    DolphinViewContainer* viewContainer = tabPageAt(index)->activeViewContainer();
+    emit activeViewChanged(viewContainer);
+    emit currentUrlChanged(viewContainer->url());
 }
 
 void DolphinTabWidget::tabInserted(int index)