X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt%2FGuiSelection.cpp;h=e10bb476fd5894e480b54701c712c314dba4e1bb;hb=b4211ef206827f85378b9392472fdc14e1e9f6c4;hp=0eb3d5133d7f49b0c5f03eae372997e4f8a7d13c;hpb=423ddb1199b9112de588082241a6ea3d0215fd7a;p=lyx.git diff --git a/src/frontends/qt/GuiSelection.cpp b/src/frontends/qt/GuiSelection.cpp index 0eb3d5133d..e10bb476fd 100644 --- a/src/frontends/qt/GuiSelection.cpp +++ b/src/frontends/qt/GuiSelection.cpp @@ -51,9 +51,10 @@ void GuiSelection::haveSelection(bool own) // an application actually requests it. // This way calling Selection::have() is cheap and we can do it as // often as we want. - //LYXERR(Debug::SELECTION, "GuiSelection: setting dummy selection"); - if (own) + if (own && !qApp->clipboard()->ownsSelection()) { + LYXERR(Debug::SELECTION, "GuiSelection: setting dummy selection"); qApp->clipboard()->setText(QString(), QClipboard::Selection); + } // We don't need to do anything if own = false, as this case is // handled by QT. // FIXME (gb): This is wrong. What is missing here is rather a call of