diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-05-22 15:19:17 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-05-22 13:56:44 +0000 |
commit | 66f603628b62b6865ebd039b729713c0a64ae851 (patch) | |
tree | cfd6975c45e9f564c4ebe92850053cf6e0131c3e | |
parent | 31c65456cc5d33bc3e58fc7536475669c0e14d75 (diff) | |
download | qt-creator-66f603628b62b6865ebd039b729713c0a64ae851.tar.gz |
Items were removed from QML overview when dragging onto editor view
Change-Id: I6e8b3cbedb78df08066f87d4aa9922145cfa151c
Task-number: QTCREATORBUG-14496
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
-rw-r--r-- | src/plugins/coreplugin/editormanager/editorview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 85fb0baf32..425323c2bc 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -135,6 +135,12 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) : m_widgetEditorMap.insert(empty, 0); auto dropSupport = new FileDropSupport(this, [this](QDropEvent *event) { + // do not accept move events except from other editor views (i.e. their tool bars) + // otherwise e.g. item views that support moving items within themselves would + // also "move" the item into the editor view, i.e. the item would be removed from the + // item view + if (!qobject_cast<EditorToolBar*>(event->source())) + event->setDropAction(Qt::CopyAction); return event->source() != m_toolBar; // do not accept drops on ourselves }); connect(dropSupport, &FileDropSupport::filesDropped, |