From bf50c84e846c30c23e6106fef9cba1c1906dcf5c Mon Sep 17 00:00:00 2001
From: megabigbug <megabigbug@arrakis.(none)>
Date: Sun, 20 Sep 2009 16:12:57 +0200
Subject: small fix of tab preview behavior

---
 src/mainview.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/mainview.cpp b/src/mainview.cpp
index 87dbfaa1..6ef99b9b 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -621,8 +621,8 @@ void MainView::mouseMoveEvent(QMouseEvent *event)
         m_currentTabPreview=tab;
     }
 
-    //if current tab then hide previous tab preview
-    if (tab==m_tabBar->currentIndex())
+    //if current tab or not found then hide previous tab preview
+    if (tab==m_tabBar->currentIndex() || tab==-1)
     {
         if ( m_previewPopup)
         {
@@ -669,7 +669,6 @@ void MainView::showTabPreview(int tab)
     }
     
     m_previewPopup = new KPassivePopup(this);
-    m_previewPopup->setAutoDelete(true);
     m_previewPopup->setFrameShape(QFrame::NoFrame);
     m_previewPopup->setFixedSize(w, h);
     QLabel *l = new QLabel();
-- 
cgit v1.2.1