X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt%2FGuiSelection.cpp;h=e10bb476fd5894e480b54701c712c314dba4e1bb;hb=b4211ef206827f85378b9392472fdc14e1e9f6c4;hp=288cb18432cfbc7eb8a763b0acf42b4b136146d9;hpb=313d9fa4d056ed213607500076c1bd391a563b6d;p=lyx.git diff --git a/src/frontends/qt/GuiSelection.cpp b/src/frontends/qt/GuiSelection.cpp index 288cb18432..e10bb476fd 100644 --- a/src/frontends/qt/GuiSelection.cpp +++ b/src/frontends/qt/GuiSelection.cpp @@ -51,14 +51,15 @@ 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 - //else // qApp->clipboard()->clear(QClipboard::Selection); + // when own is false. // Since we do not issue this call we rather implement // "persistent selections" as far as X is concerned. }