bugGNU Octave - Bugs: bug #50559, GUI editor: drag & drop to...


bug #50559: GUI editor: drag & drop to code editor does not work properly

Submitted by:  Hartmut <hardy>
Submitted on:  Thu 16 Mar 2017 01:00:16 PM UTC  
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Open/Closed: Closed
Release: 4.2.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon 03 Apr 2017 11:55:47 AM UTC, comment #7:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/4eff94123bea

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 30 Mar 2017 08:56:51 PM UTC, comment #6:

I have compiled a current "default" Octave (hg-id f04f32f08590) on my Ubuntu 16.04 system, including the patch from comment #5. The resulting binary has the originally reported bug FIXED in the GUI editor. Thanks, John.

I haven't tested on Windows (can't built mxe-octave right now...), nor on any other Linux system.

Hartmut <hardy>
Thu 30 Mar 2017 06:31:09 PM UTC, comment #5:

This works for me in fedora (and doesn't break windows) - attached

Using [1] as a clue I am guessing that the mime format used by default is different on windows vs Linux (maybe some file explorer types??)

We have code in the file_editor class that handles opening the files, but it (in the Linux tests I did) was not getting called when dropping a file onto the editor.

Disabling drop on the QScintilla editor, so it passes it back to our widget that will accept it, calls our code and open the file as expected.

[1] https://forum.qt.io/topic/12026/solved-drag-n-drop-a-file-in-an-editor-different-behaviour-on-linux-compared-to-windows-mac-os-x

(file #40214)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 30 Mar 2017 12:08:19 PM UTC, comment #4:

I see the same in fedora 24, using the dolphin file manager - taking a look to see what I can see

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 18 Mar 2017 08:34:19 AM UTC, comment #3:

This is weird. I know the behavior that you are describing from pasting a file into a text input field (a convenient way to enter a complete file path). Obviously, in your case, an open file is interpreted as such a text input and the urls included in the dragged data are ignored.

I am wondering whether this behavior is a system setting in ubuntu.

Torsten <ttl>
Project Member
Fri 17 Mar 2017 09:56:49 PM UTC, comment #2:

I have re-tested this behavior with a recent built of default octave (hg-id dfee8aa390c2, from mid February 2017) on my Ubuntu 16.04 machine. And the behavior is still as described in my comment #0.

(note: dropping a file onto the empty editor area also works fine. I only see the wrong behavior when dropping a file on top of the displayed text area of another already opened m-file in the editor.)

Hartmut <hardy>
Fri 17 Mar 2017 09:18:28 PM UTC, comment #1:

In a version compiled from the current default branch under ubuntu 16.04, the files which are dragged into the edit area of the editor are opened as expected. The same holds for a version 4.2.0 compiled from an older state of the stable branch.

Torsten <ttl>
Project Member
Thu 16 Mar 2017 01:00:16 PM UTC, original submission:

This bug is a "fork" from bug #41443. This feature currently works in the Windows version of Octave 4.2.1, but does NOT work in the linux version of Octave 4.2.1.

Here is how to reproduce it (linux only):

  • You have an m-file open in the GUI editor.
  • you drag and drop a second m-file to the GUI editor, to be precise you drop it onto the text area of the first m-file.
  • current result: The string "file:///path/to/file.m" is inserted into the code of the first m-file.
  • my expected behavior would be for this common usecase: open the second m-file as an additional tab in the GUI editor.

Since this feature works fine in the Windows release, and doesn't work in the linux release, I think this can be considered a "proper" bug, and not only a wish.

Note: dropping the second file to the "pane area" at the top of the GUI editor also does work under linux.

My Octave version: 4.2.1, self compiled under Ubuntu 16.04. (german locale, if this makes a difference)

Hartmut <hardy>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #40214:  bug50559.patch added by lostbard (980B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by hardy (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Apr 2017 11:56:01 AM UTClostbardStatusReady For Test=>Fixed
    Mon 03 Apr 2017 11:55:47 AM UTClostbardStatusNone=>Ready For Test
      Assigned toNone=>lostbard
    Thu 30 Mar 2017 06:31:09 PM UTClostbardAttached File-=>Added bug50559.patch, #40214

    Back to the top

    Powered by Savane 3.1-cleanup1