[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file |
Date: |
Tue, 20 Dec 2022 08:36:47 -0500 (EST) |
Follow-up Comment #12, bug #63548 (project octave):
The following change in file_editor_tab::load_file avoids the problem for me.
I'm not sure why load_file wants to open the file for reading only, but that
fails if the file doesn't exist. That failure is apparently not fatal unless
we are trying to reuse an existing "unnamed" buffer.
diff --git a/libgui/src/m-editor/file-editor-tab.cc
b/libgui/src/m-editor/file-editor-tab.cc
--- a/libgui/src/m-editor/file-editor-tab.cc
+++ b/libgui/src/m-editor/file-editor-tab.cc
@@ -1802,7 +1802,7 @@ OCTAVE_BEGIN_NAMESPACE(octave)
else
file_to_load = fileName;
QFile file (file_to_load);
- if (!file.open(QIODevice::ReadOnly))
+ if (!file.open(QIODevice::ReadWrite))
return file.errorString ();
int col = 0, line = 0;
The attached (larger) diff also avoids the problem by not attempting to reuse
an existing "unnamed" buffer.
(file #54126)
_______________________________________________________
Additional Item Attachment:
File name: no-reuse-file-diff.txt Size:1 KB
<https://file.savannah.gnu.org/file/no-reuse-file-diff.txt?file_id=54126>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63548>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, (continued)
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Luiz Antonio Maccari Junior, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Luiz Antonio Maccari Junior, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Dmitri A. Sergatskov, 2022/12/19
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Rik, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Rik, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file,
John W. Eaton <=
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Dmitri A. Sergatskov, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Nicholas Jankowski, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Philip Nienhuis, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Philip Nienhuis, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Philip Nienhuis, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Philip Nienhuis, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Markus Mützel, 2022/12/20
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Rik, 2022/12/23
- [Octave-bug-tracker] [bug #63548] GUI closing suddenly when selecting a recently deleted file, Markus Mützel, 2022/12/23