]> git.lyx.org Git - features.git/commitdiff
avoid that the internal Buffer used for cut&paste is visible in View menu.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 20 Jul 2008 17:55:38 +0000 (17:55 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 20 Jul 2008 17:55:38 +0000 (17:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25732 a592a061-630c-0410-9148-cb99ea01b6c8

src/CutAndPaste.cpp
src/frontends/qt4/Menus.cpp

index ee639f3c6c27ad95feb43329e7515a68546e3a06..481f379056f599886eaf97af64d4449692a8a206 100644 (file)
@@ -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);
index 8c640244212dd4e066b72ed7ce7a0e96a12e32d5..133147fb2093b0be8d6fe0b0be79a27ccaf3a100 100644 (file)
@@ -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)