Skip to content

Commit

Permalink
Merge pull request #1611 from rstudio/bugfix/slow-file-dialog
Browse files Browse the repository at this point in the history
avoid querying clipboard while modal active
  • Loading branch information
jmcphers committed Oct 16, 2017
2 parents 568985e + 39a30e8 commit 68aba2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cpp/desktop/DesktopGwtCallback.cpp
Expand Up @@ -302,6 +302,11 @@ QString GwtCallback::getExistingDirectory(const QString& caption,

void GwtCallback::onClipboardChanged(QClipboard::Mode mode)
{
// for some reason, Qt can get stalled querying the clipboard
// while a modal is active, so disable any such behavior here
if (QApplication::activeModalWidget() != NULL)
return;

// if this is a change in the selection contents, track it
if (mode == QClipboard::Selection)
{
Expand Down

0 comments on commit 68aba2d

Please sign in to comment.