┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-04-16 21:08:09 +0000
committerPeter Penz <[email protected]>2008-04-16 21:08:09 +0000
commit3a27f307993829fabfa34e89a8e794e8c5c4ebca (patch)
tree40556fa2d2aa057dc7004245060a70b00b18d416 /src/dolphindetailsview.cpp
parenteb36093c2c5a8782c7c7f6be92881c108c30a5b1 (diff)
* clear the selection toggle when zooming in or out
* clear the selection toggle when using the scroll wheel (this is only a temporary workaround until Qt-issue #200665 has been fixed) BUG: 159737 svn path=/trunk/KDE/kdebase/apps/; revision=797808
Diffstat (limited to 'src/dolphindetailsview.cpp')
-rw-r--r--src/dolphindetailsview.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index aef034df1..08d03fb0b 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -47,6 +47,7 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
QTreeView(parent),
m_autoResize(true),
m_controller(controller),
+ m_selectionManager(0),
m_font(),
m_decorationSize(),
m_showElasticBand(false),
@@ -98,12 +99,12 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
connect(this, SIGNAL(clicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
- SelectionManager* selManager = new SelectionManager(this);
- connect(selManager, SIGNAL(selectionChanged()),
+ m_selectionManager = new SelectionManager(this);
+ connect(m_selectionManager, SIGNAL(selectionChanged()),
this, SLOT(requestActivation()));
connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
- selManager, SLOT(reset()));
- }
+ m_selectionManager, SLOT(reset()));
+ }
} else {
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
@@ -345,11 +346,16 @@ void DolphinDetailsView::resizeEvent(QResizeEvent* event)
void DolphinDetailsView::wheelEvent(QWheelEvent* event)
{
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
+
// let Ctrl+wheel events propagate to the DolphinView for icon zooming
if (event->modifiers() & Qt::ControlModifier) {
event->ignore();
return;
}
+
QTreeView::wheelEvent(event);
}
@@ -555,6 +561,10 @@ void DolphinDetailsView::updateDecorationSize()
m_controller->setZoomInPossible(isZoomInPossible());
m_controller->setZoomOutPossible(isZoomOutPossible());
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
+
doItemsLayout();
}