]> git.lyx.org Git - features.git/commitdiff
Fix bug 3145: not possible to copy stuff from dialogs to document text.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 27 Jan 2007 16:55:25 +0000 (16:55 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 27 Jan 2007 16:55:25 +0000 (16:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16887 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/Clipboard.h
src/frontends/qt4/GuiClipboard.C

index deddf5b0c98e72e914528b7907a94652af86d332..42ecd6c1a5510770ce6708505f32351027d4e920 100644 (file)
@@ -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;
index 0f770319e5cc04198528b7a1d28b960475e55904..03388b3c094ca3a748a84831b38b7cbd172203bb 100644 (file)
@@ -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();
 }