From: Georg Baum Date: Sat, 27 Jan 2007 16:55:25 +0000 (+0000) Subject: Fix bug 3145: not possible to copy stuff from dialogs to document text. X-Git-Tag: 1.6.10~11040 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4ad3995b2a392b5dc7fb933432bea161cb321d0a;p=features.git Fix bug 3145: not possible to copy stuff from dialogs to document text. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16887 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/Clipboard.h b/src/frontends/Clipboard.h index deddf5b0c9..42ecd6c1a5 100644 --- a/src/frontends/Clipboard.h +++ b/src/frontends/Clipboard.h @@ -52,7 +52,8 @@ public: /// Does the clipboard contain LyX contents? virtual bool hasLyXContents() const = 0; /// state of clipboard. - /// \retval true if the system clipboard has been set within LyX. + /// \returns true if the system clipboard has been set within LyX + /// (document contents, dialogs count as external here). virtual bool isInternal() const = 0; /// Is the clipboard empty? virtual bool empty() const = 0; diff --git a/src/frontends/qt4/GuiClipboard.C b/src/frontends/qt4/GuiClipboard.C index 0f770319e5..03388b3c09 100644 --- a/src/frontends/qt4/GuiClipboard.C +++ b/src/frontends/qt4/GuiClipboard.C @@ -108,7 +108,9 @@ bool GuiClipboard::hasLyXContents() const bool GuiClipboard::isInternal() const { - return qApp->clipboard()->ownsClipboard(); + // ownsClipboard() is also true for stuff coming from dialogs, e.g. + // the preamble dialog + return qApp->clipboard()->ownsClipboard() && hasLyXContents(); }