[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu May 6 18:27:40 CEST 2004
CVS commit by arwalker:
Cancel the drag operation if the object(s) being dragged are dragged back into the window they originated from.
M +1 -8 ksttoplevelview.cpp 1.40
M +4 -2 kstviewwidget.cpp 1.22
--- kdeextragear-2/kst/kst/ksttoplevelview.cpp #1.39:1.40
@@ -211,12 +211,5 @@ void KstTopLevelView::restartMove() {
_cursor.setShape(Qt::SizeAllCursor);
_w->setCursor(_cursor);
- //_pressTarget = FIXME;
- if (_selectionList.isEmpty()) { // focus move
assert(_pressTarget);
- _moveOffset = _w->mapFromGlobal(QCursor::pos()) - _pressTarget->position();
- } else { // selection move
- assert(_pressTarget);
- _moveOffset = _w->mapFromGlobal(QCursor::pos()) - _pressTarget->position();
- }
}
--- kdeextragear-2/kst/kst/kstviewwidget.cpp #1.21:1.22
@@ -25,4 +25,6 @@
#include <kpopupmenu.h>
#include <qdragobject.h>
+#include <qevent.h>
+#include <qapplication.h>
KstViewWidget::KstViewWidget(KstTopLevelView *view, QWidget *parent, const char *name, WFlags w)
@@ -174,6 +176,6 @@ void KstViewWidget::dragEnterEvent(QDrag
if (e->provides(KstPlotDrag::mimeType())) {
if (e->source() == this) {
- delete _drag;
- _drag = 0L;
+ QKeyEvent keyEvent( QEvent::KeyPress, Qt::Key_Escape, 0, 0 );
+ QApplication::sendEvent( this, &keyEvent );
_view->restartMove();
e->accept(false);
More information about the Kst
mailing list