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 Mar 16 13:00:16 2017  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich 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)

Thu Mar 30 20:56:51 2017, 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 Mar 30 18:31:09 2017, 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 Member
Thu Mar 30 12:08:19 2017, 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 Member
Sat Mar 18 08:34:19 2017, 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 Mar 17 21:56:49 2017, 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 Mar 17 21:18:28 2017, 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 Mar 16 13:00:16 2017, 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):
   
   
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
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by ttl (Posted a comment)
  • -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):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Mar 30 18:31:09 2017lostbardAttached File-=>Added bug50559.patch, #40214

    Back to the top


    Powered by Savane 3.1-cleanup1