changeset 31684:1f6bdbb5531b

maint: merge stable to default
author Rik <rik@octave.org>
date Thu, 22 Dec 2022 21:31:35 -0800
parents fa266de5efc1 (current diff) 74c18a1f357b (diff)
children 671ef1b7c3fa
files libgui/src/m-editor/file-editor.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Thu Dec 22 20:13:25 2022 +0100
+++ b/libgui/src/m-editor/file-editor.cc	Thu Dec 22 21:31:35 2022 -0800
@@ -1654,8 +1654,11 @@
               }
             else
               {
-                delete fileEditorTab;
-                fileEditorTab = nullptr;
+                if (! reusing)
+                  {
+                    delete fileEditorTab;
+                    fileEditorTab = nullptr;
+                  }
 
                 if (QFile::exists (openFileName))
                   {