#include "dolphin_iconsmodesettings.h"
-#include <kdirmodel.h>
-#include <kfileitem.h>
-#include <kfileitemdelegate.h>
-
#include <QAbstractProxyModel>
#include <QApplication>
#include <QPainter>
void DolphinIconsView::mousePressEvent(QMouseEvent* event)
{
+ m_controller->triggerActivation();
if (!indexAt(event->pos()).isValid()) {
const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) {
KListView::mousePressEvent(event);
}
-void DolphinIconsView::mouseReleaseEvent(QMouseEvent* event)
-{
- KListView::mouseReleaseEvent(event);
- m_controller->triggerActivation();
-}
-
void DolphinIconsView::dragEnterEvent(QDragEnterEvent* event)
{
if (event->mimeData()->hasUrls()) {
m_dragging = true;
}
+void DolphinIconsView::dragLeaveEvent(QDragLeaveEvent* event)
+{
+ KListView::dragLeaveEvent(event);
+
+ // TODO: remove this code when the issue #160611 is solved in Qt 4.4
+ m_dragging = false;
+ setDirtyRegion(m_dropRect);
+}
+
void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event)
{
KListView::dragMoveEvent(event);