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

 
 

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

Submitter:  Hartmut <hardy>
Submitted:  Thu 16 Mar 2017 01:00:16 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 03 Apr 2017 11:55:47 AM UTC, comment #7: 
John Donoghue <lostbard>
Group Member
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>
Group Member
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>
Group Member
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 Lilge <ttl>
Group 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 Lilge <ttl>
Group 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 Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-03 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-04-03 lostbard StatusNone Ready For Test
        Assigned toNone lostbard
    2017-03-30 lostbard Attached File- Added bug50559.patch, #40214

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code