* 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
QListView(parent),
m_active(true),
m_view(columnView),
QListView(parent),
m_active(true),
m_view(columnView),
m_url(url),
m_childUrl(),
m_font(),
m_url(url),
m_childUrl(),
m_font(),
const bool useSelManager = KGlobalSettings::singleClick() &&
DolphinSettings::instance().generalSettings()->showSelectionToggle();
if (useSelManager) {
const bool useSelManager = KGlobalSettings::singleClick() &&
DolphinSettings::instance().generalSettings()->showSelectionToggle();
if (useSelManager) {
- SelectionManager* selManager = new SelectionManager(this);
- connect(selManager, SIGNAL(selectionChanged()),
+ m_selectionManager = new SelectionManager(this);
+ connect(m_selectionManager, SIGNAL(selectionChanged()),
this, SLOT(requestActivation()));
connect(m_view->m_controller, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(requestActivation()));
connect(m_view->m_controller, SIGNAL(urlChanged(const KUrl&)),
- selManager, SLOT(reset()));
+ m_selectionManager, SLOT(reset()));
}
new KMimeTypeResolver(this, m_dolphinModel);
}
new KMimeTypeResolver(this, m_dolphinModel);
if (m_iconManager != 0) {
m_iconManager->updatePreviews();
}
if (m_iconManager != 0) {
m_iconManager->updatePreviews();
}
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
}
void DolphinColumnWidget::setActive(bool active)
}
void DolphinColumnWidget::setActive(bool active)
void DolphinColumnWidget::wheelEvent(QWheelEvent* event)
{
void DolphinColumnWidget::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;
}
// let Ctrl+wheel events propagate to the DolphinView for icon zooming
if (event->modifiers() & Qt::ControlModifier) {
event->ignore();
return;
}
QListView::wheelEvent(event);
}
QListView::wheelEvent(event);
}
class KJob;
class KFileItem;
class KFileItemList;
class KJob;
class KFileItem;
class KFileItemList;
private:
bool m_active;
DolphinColumnView* m_view;
private:
bool m_active;
DolphinColumnView* m_view;
+ SelectionManager* m_selectionManager;
KUrl m_url; // URL of the directory that is shown
KUrl m_childUrl; // URL of the next column that is shown
KUrl m_url; // URL of the directory that is shown
KUrl m_childUrl; // URL of the next column that is shown
QTreeView(parent),
m_autoResize(true),
m_controller(controller),
QTreeView(parent),
m_autoResize(true),
m_controller(controller),
m_font(),
m_decorationSize(),
m_showElasticBand(false),
m_font(),
m_decorationSize(),
m_showElasticBand(false),
connect(this, SIGNAL(clicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
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&)),
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&)));
} else {
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
void DolphinDetailsView::wheelEvent(QWheelEvent* 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;
}
// let Ctrl+wheel events propagate to the DolphinView for icon zooming
if (event->modifiers() & Qt::ControlModifier) {
event->ignore();
return;
}
QTreeView::wheelEvent(event);
}
QTreeView::wheelEvent(event);
}
m_controller->setZoomInPossible(isZoomInPossible());
m_controller->setZoomOutPossible(isZoomOutPossible());
m_controller->setZoomInPossible(isZoomInPossible());
m_controller->setZoomOutPossible(isZoomOutPossible());
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
+
#include <libdolphin_export.h>
class DolphinController;
#include <libdolphin_export.h>
class DolphinController;
/**
* @brief Represents the details view which shows the name, size,
/**
* @brief Represents the details view which shows the name, size,
bool m_autoResize; // if true, the columns are resized automatically to the available width
DolphinController* m_controller;
bool m_autoResize; // if true, the columns are resized automatically to the available width
DolphinController* m_controller;
+ SelectionManager* m_selectionManager;
QFont m_font;
QSize m_decorationSize;
QFont m_font;
QSize m_decorationSize;
DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
KCategorizedView(parent),
m_controller(controller),
DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
KCategorizedView(parent),
m_controller(controller),
m_categoryDrawer(0),
m_font(),
m_decorationSize(),
m_categoryDrawer(0),
m_font(),
m_decorationSize(),
connect(this, SIGNAL(clicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
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&)),
this, SLOT(requestActivation()));
connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
- selManager, SLOT(reset()));
+ m_selectionManager, SLOT(reset()));
}
} else {
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
}
} else {
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
void DolphinIconsView::wheelEvent(QWheelEvent* 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();
// let Ctrl+wheel events propagate to the DolphinView for icon zooming
if (event->modifiers() & Qt::ControlModifier) {
event->ignore();
if (delegate != 0) {
delegate->setMaximumSize(m_itemSize);
}
if (delegate != 0) {
delegate->setMaximumSize(m_itemSize);
}
+
+ if (m_selectionManager != 0) {
+ m_selectionManager->reset();
+ }
}
int DolphinIconsView::additionalInfoCount() const
}
int DolphinIconsView::additionalInfoCount() const
#include <libdolphin_export.h>
class DolphinController;
#include <libdolphin_export.h>
class DolphinController;
class DolphinCategoryDrawer;
/**
class DolphinCategoryDrawer;
/**
private:
DolphinController* m_controller;
private:
DolphinController* m_controller;
+ SelectionManager* m_selectionManager;
DolphinCategoryDrawer* m_categoryDrawer;
QFont m_font;
DolphinCategoryDrawer* m_categoryDrawer;
QFont m_font;