/// 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;
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();
}