diff --git a/libgui/src/m-editor/file-editor.cc b/libgui/src/m-editor/file-editor.cc --- a/libgui/src/m-editor/file-editor.cc +++ b/libgui/src/m-editor/file-editor.cc @@ -1608,22 +1608,7 @@ OCTAVE_BEGIN_NAMESPACE(octave) if (breakpoint_marker && ! insert) return; // Never open a file when removing breakpoints - file_editor_tab *fileEditorTab = nullptr; - // Reuse tab if it hasn't yet been modified. - bool reusing = false; - tab = find_tab_widget (""); - if (tab) - { - fileEditorTab = tab; - if (fileEditorTab->qsci_edit_area ()->isModified ()) - fileEditorTab = nullptr; - else - reusing = true; - } - - // If was absent or modified, create a new tab. - if (! fileEditorTab) - fileEditorTab = make_file_editor_tab (); + file_editor_tab *fileEditorTab = make_file_editor_tab (); fileEditorTab->set_encoding (encoding); QString result = fileEditorTab->load_file (openFileName); @@ -1631,8 +1616,7 @@ OCTAVE_BEGIN_NAMESPACE(octave) { // Supply empty title then have the file_editor_tab update // with full or short name. - if (! reusing) - add_file_editor_tab (fileEditorTab, "", index); + add_file_editor_tab (fileEditorTab, "", index); fileEditorTab->update_window_title (false); // file already loaded, add file to mru list here QFileInfo file_info = QFileInfo (openFileName);