diff options
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editorview.cpp')
-rw-r--r-- | src/plugins/coreplugin/editormanager/editorview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 447c337ff9b..2178644e240 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -135,7 +135,13 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) : m_container->addWidget(empty); m_widgetEditorMap.insert(empty, 0); - auto dropSupport = new FileDropSupport(this, [this](QDropEvent *event) { + auto dropSupport = new FileDropSupport(this, [this](QDropEvent *event) -> bool { + // 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, |