Defer loading .rdc from drag & drop, to unblock the calling application

This commit is contained in:
baldurk
2017-11-10 18:36:08 +00:00
parent 136909eaad
commit 82e1218b62
3 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -1776,7 +1776,11 @@ void MainWindow::dropEvent(QDropEvent *event)
{
QString fn = dragFilename(event->mimeData());
if(!fn.isEmpty())
LoadFromFilename(fn, false);
{
// we defer this so we can return immediately and unblock whichever application dropped the
// item.
GUIInvoke::defer([this, fn]() { LoadFromFilename(fn, false); });
}
}
void MainWindow::LoadSaveLayout(QAction *action, bool save)