diff options
Diffstat (limited to 'src/tabwindow')
-rw-r--r-- | src/tabwindow/tabbar.cpp | 8 | ||||
-rw-r--r-- | src/tabwindow/tabwindow.cpp | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp index 7e493fec..feb3fd8d 100644 --- a/src/tabwindow/tabbar.cpp +++ b/src/tabwindow/tabbar.cpp @@ -34,6 +34,7 @@ #include "webwindow.h" #include "iconmanager.h" +#include "sessionmanager.h" #include <KAcceleratorManager> #include <KAction> @@ -511,7 +512,7 @@ void TabBar::pinTab() tabButton(index, QTabBar::RightSide)->hide(); setTabText(index, QString()); - // workaround: "fix" the icon + // workaround: "fix" the icon (or at least, try to...) QLabel *label = qobject_cast<QLabel* >(tabButton(index, QTabBar::LeftSide)); if (!label) label = new QLabel(this); @@ -522,6 +523,7 @@ void TabBar::pinTab() KIcon ic = IconManager::self()->iconForUrl(w->webWindow(index)->url()); label->setPixmap(ic.pixmap(16, 16)); + SessionManager::self()->saveSession(); } @@ -554,7 +556,7 @@ void TabBar::unpinTab() tabButton(index, QTabBar::RightSide)->show(); setTabText(index, w->webWindow(index)->title()); - // workaround: "fix" the icon + // workaround: "fix" the icon (or at least, try to...) QLabel *label = qobject_cast<QLabel* >(tabButton(index, QTabBar::LeftSide)); if (!label) label = new QLabel(this); @@ -564,4 +566,6 @@ void TabBar::unpinTab() KIcon ic = IconManager::self()->iconForUrl(w->webWindow(index)->url()); label->setPixmap(ic.pixmap(16, 16)); + + SessionManager::self()->saveSession(); } diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index 55d680b5..203da30a 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -331,9 +331,12 @@ void TabWindow::tabLoadFinished(bool ok) QLabel *label = qobject_cast<QLabel* >(tabBar()->tabButton(index, QTabBar::LeftSide)); QMovie *movie = label->movie(); - movie->stop(); - delete movie; - + if (movie) + { + movie->stop(); + delete movie; + } + label->setMovie(0); KIcon ic = IconManager::self()->iconForUrl(tab->url()); |