From ba7e6e2b0345b239f5299a12bc6ec9078ed76bb3 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 20 Jul 2008 17:55:38 +0000 Subject: [PATCH] avoid that the internal Buffer used for cut&paste is visible in View menu. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25732 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CutAndPaste.cpp | 2 +- src/frontends/qt4/Menus.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index ee639f3c6c..481f379056 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -367,7 +367,7 @@ void putClipboard(ParagraphList const & paragraphs, // some kind of garbage collection there, or a shared_ptr, then this // would not be needed. static Buffer * buffer = theBufferList().newBuffer( - FileName::tempName().absFilename()); + FileName::tempName().absFilename() + "_clipboard.internal"); buffer->setUnnamed(true); buffer->paragraphs() = paragraphs; buffer->params().setDocumentClass(docclass); diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 8c64024421..133147fb20 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -680,6 +680,11 @@ void MenuDefinition::expandDocuments() // We cannot use a for loop as the buffer list cycles. do { QString label = toqstr(b->fileName().displayName(20)); + if (b->isUnnamed() && label.endsWith(".internal")) { + // This is an internal Buffer (eg. for clipboard operations) + b = theBufferList().next(b); + continue; + } if (!b->isClean()) label += "*"; if (ii < 10) -- 2.39.5