[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/guiutils
From: Cyrille Berger <cyb () lepi ! org>
Date: 2009-06-01 11:43:03
Message-ID: 1243856583.364790.20615.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 976235 by berger:
Fix: don't switch layers when seting visiblity and locking
BUG:194490
M +10 -10 KoDocumentSectionDelegate.cpp
M +1 -4 KoDocumentSectionView.cpp
--- trunk/koffice/libs/guiutils/KoDocumentSectionDelegate.cpp #976234:976235
@@ -101,20 +101,10 @@
if( ( e->type() == QEvent::MouseButtonPress || e->type() == \
QEvent::MouseButtonDblClick ) && (index.flags() & Qt::ItemIsEnabled ) ) {
QMouseEvent *me = static_cast<QMouseEvent*>( e );
- if( me->button() != Qt::LeftButton )
- {
- d->view->setCurrentIndex( index );
- return false;
- }
const QRect ir = iconsRect( option, index ).translated( \
option.rect.topLeft() ),
tr = textRect( option, index ).translated( option.rect.topLeft() \
);
- if( !( me->modifiers() & Qt::ControlModifier) && !( me->modifiers() & \
Qt::ShiftModifier ) )
- {
- d->view->setCurrentIndex( index );
- }
-
if( ir.isValid() && ir.contains( me->pos() ) )
{
const int iconWidth = option.decorationSize.width();
@@ -141,6 +131,16 @@
d->view->edit( index );
return true;
}
+ if( me->button() != Qt::LeftButton )
+ {
+ d->view->setCurrentIndex( index );
+ return false;
+ }
+
+ if( !( me->modifiers() & Qt::ControlModifier) && !( me->modifiers() & \
Qt::ShiftModifier ) ) + {
+ d->view->setCurrentIndex( index );
+ }
}
else if( e->type() == QEvent::ToolTip )
--- trunk/koffice/libs/guiutils/KoDocumentSectionView.cpp #976234:976235
@@ -93,15 +93,13 @@
{
switch( e->type() )
{
-#if 0
- // i commented this because it was breaking the expanding/unexpanding of \
items with children, I don't see the need for those, but maybe I miss something ? \
</cyrille> case QEvent::MouseButtonPress:
{
const QPoint pos = static_cast<QMouseEvent*>( e )->pos();
if( !indexAt( pos ).isValid() )
return super::viewportEvent( e );
QModelIndex index = model()->buddy( indexAt( pos ) );
- return d->delegate->editorEvent( e, model(), optionForIndex( index \
), index ); + if(d->delegate->editorEvent( e, model(), optionForIndex( \
index ), index )) return true; } break;
case QEvent::Leave:
{
@@ -128,7 +126,6 @@
d->hovered = hovered;
}
} break;
- #endif
case QEvent::ToolTip:
{
const QPoint pos = static_cast<QHelpEvent*>( e )->pos();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic