From fa38864b0087bb2de2696f0b395789636437c21b Mon Sep 17 00:00:00 2001 From: Yusuf Tezcan Date: Thu, 29 Dec 2011 09:24:59 +0100 Subject: Correctly hide preview selector bar when its preview is deleted in the new tab page CCMAIL: yatezcan@gmail.com REVIEW:103470 REVIEWED-BY: adjam --- src/newtabpage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newtabpage.cpp') diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index 09d15af6..9a908b24 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -40,6 +40,7 @@ #include "historymodels.h" #include "mainview.h" #include "mainwindow.h" +#include "previewselectorbar.h" #include "websnap.h" #include "webpage.h" #include "webtab.h" @@ -337,6 +338,10 @@ void NewTabPage::removePreview(int index) QStringList names = ReKonfig::previewNames(); QStringList urls = ReKonfig::previewUrls(); + if (urls.at(index).isEmpty() + || names.at(index).isEmpty()) + rApp->mainWindow()->currentTab()->hideSelectorBar(); + urls.removeAt(index); names.removeAt(index); -- cgit v1.2.1