┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.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/dolphiniconsview.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/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 7b9ddd6ac..a9659739a 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -41,6 +41,7 @@
DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
KCategorizedView(parent),
m_controller(controller),
+ m_selectionManager(0),
m_categoryDrawer(0),
m_font(),
m_decorationSize(),
@@ -68,11 +69,11 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
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&)),
@@ -247,6 +248,10 @@ void DolphinIconsView::keyPressEvent(QKeyEvent* event)
void DolphinIconsView::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();
@@ -453,6 +458,10 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount)
if (delegate != 0) {
delegate->setMaximumSize(m_itemSize);
}
+
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
}
int DolphinIconsView::additionalInfoCount() const