[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [Patch] Fix drop to KTabWidget with zero tabs
From:       "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date:       2008-12-03 19:30:05
Message-ID: 200812032030.06847.kossebau () kde ! org
[Download RAW message or body]

Hi,

currently if a KTabWidget contains no tabs the drop support of KTabWidget 
falls flat on the face. Especially sad because the full widget space could 
now be considered as the dropping zone.

The drop fails because with 0 tabs no tabbar is shown, so isEmptyTabbarSpace() 
returns false.

Okay to commit the attached patch?

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta

["FixDropWith0Tabs.patch" (text/x-diff)]

Index: kdelibs/kdeui/widgets/ktabwidget.cpp
===================================================================
--- kdelibs/kdeui/widgets/ktabwidget.cpp	(Revision 891841)
+++ kdelibs/kdeui/widgets/ktabwidget.cpp	(Arbeitskopie)
@@ -73,6 +73,9 @@
 
 bool KTabWidget::Private::isEmptyTabbarSpace( const QPoint &point ) const
 {
+    if (m_parent->count() == 0) {
+        return true;
+    }
     if (m_parent->tabBar()->isHidden()) {
         return false;
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic