bugGNU Octave - Bugs: bug #54495, Drag and drop inside editor does...

 
 

bug #54495: Drag and drop inside editor does not work

Submitted by:  None
Submitted on:  Sat 11 Aug 2018 07:18:31 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  John Donoghue <lostbard>
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  dev
Operating System:  Microsoft Windows

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)

Wed 19 Sep 2018 07:18:46 PM UTC, comment #30:

Closing as fixed

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 19 Sep 2018 04:44:32 PM UTC, comment #29:

I recompiled again last night and it worked this morning when I tried it!

I run the same commands you do (in comment #27). I suspect that it somehow didn't pull the newest octave version, because the hg_id was the newest, and it did pull a change on the octave version when I compiled the second time last night. I had checked the hg_id file to see that the mxe-octave commit was the newest, but wasn't sure how to check the octave commit version, I was almost going to ask, but comment #28 was exactly what I needed (except the auto formatting ate some underscores and didn't let direct copy and paste work):

The current version that I have is the correct one, being ad3417a54be6.

Thanks for this fix!

Marshall <marsian>
Tue 18 Sep 2018 08:54:42 PM UTC, comment #28:

Ot better yet, when running octave in windows what does:

_octave_config_info_ ("hg_id")

report ?

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 18 Sep 2018 08:50:39 PM UTC, comment #27:

How did you pull it into mxe-octave ?

I usually (from in mxe-octave) run:

make hg-octave-dist
touch src/default-octave.mk
make nsis-installer

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 18 Sep 2018 08:40:07 PM UTC, comment #26:

I recompiled, and it doesn't seem to have changed anything for me in Windows. Still works only if docked.

Marshall <marsian>
Tue 18 Sep 2018 02:16:28 PM UTC, comment #25:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/ad3417a54be6 which seems to fix it for me, and doesn't appear to break anything in Linux.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 10 Sep 2018 06:48:43 PM UTC, comment #24:

Ah, docked vs. undocked. Yes that makes a difference :-)

Confirmed here on Windows 7: when docked drag 'n drop works as advertised, undocked it doesn't.

OS -> Windows
release -> dev

Philip Nienhuis <philipnienhuis>
Project Member
Mon 10 Sep 2018 05:02:36 PM UTC, comment #23:

I can confirm comment #21 and #22. In windows, neither text drag and drop nor file drag work if the editor is floating, but both do work if docked. In my linux VM (Ubuntu 18.04 LTS), both work whether the editor is docked or not.
In Octave 4.4.1 on Windows 10, both docked and undocked act the same, where text can't be dragged, but will open a file dragged to it from windows file explorer.

Marshall <marsian>
Mon 10 Sep 2018 01:11:43 PM UTC, comment #22:

It works in both cases for me, ubuntu Linux 18.04.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 10 Sep 2018 01:02:04 PM UTC, comment #21:

I think I see a issue, perhaps related.

On mine, (dev octave, windows 10, 64bit) this is what I am doing:

With the editor pane docked into the main octave window:

1. I open an editor window and type
hello world

2. Highlight 'ell'

3. click and hold on the selected text and drag it to the end of 'world' and release - the text moves. 'Ho worldell'

If I open file explorer, and drag a file from there into the opened editor window and release, it opens that file

I undock the window so it is floating - now I cant get it to accept dragged files or drag text. When I dock it again, it is working again.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 08 Sep 2018 09:08:33 AM UTC, comment #20:

Reopening.
(not yet sure if OS should be Windows)

Whether the fix in comment #15 is to blame I don't know, but indeed dragging a file onto the edit pane doesn't work now (and it does in 4.4.1 64bit idx).

Dragging text around has never worked for me but then I rarely use that.

(windows 7, dev version from 4 sept)

Philip Nienhuis <philipnienhuis>
Project Member
Fri 07 Sep 2018 06:46:05 PM UTC, comment #19:

I've built the dev version that includes the fix here, and it works in my linux vm, but when installing on Windows it doesn't work. It not only doesn't allow drag and drop of text inside the editor, it also broke drag and drop of a file onto the editor to open that file in the editor.

Marshall <marsian>
Wed 29 Aug 2018 10:57:43 PM UTC, comment #18:

Glad to see this fixed. This bug was reported in bug #52716, so that can be closed too.

Marshall <marsian>
Wed 22 Aug 2018 03:46:27 AM UTC, comment #17:

Can someone explain - preferably on a dedicated Wiki page (https://wiki.octave.org/GNU_Octave_Wiki) how to apply a patch. I've searched but nothing I found works.

Anonymous
Fri 17 Aug 2018 11:51:24 AM UTC, comment #16:

Closing as fixed

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 15 Aug 2018 05:33:25 PM UTC, comment #15:

And pushed http://hg.savannah.gnu.org/hgweb/octave/rev/052a0d5dfd2c

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 15 Aug 2018 05:28:58 PM UTC, comment #14:

Works in windows too

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Aug 2018 02:54:45 PM UTC, comment #13:

Patch attached that works for me in fedora for both cases (test in editor, and drag file to the editor)

(file #44781)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Aug 2018 02:43:18 PM UTC, comment #12:

I think I have a fix to get both working - I'll post up a changeset when done

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Aug 2018 01:36:04 PM UTC, comment #11:

I will take that back, the actually issue is caused by https://hg.savannah.gnu.org/hgweb/octave/rev/4eff94123bea, (bug #50559), which I broke the text drag with the fix :)

The issue is that since on that previous chamnge set of comment #5 below (https://hg.savannah.gnu.org/hgweb/octave/rev/7332287221a9 ), the tabwidget is now handling the drag/drop because it wants to get the case of someone dragging files. However, it was not working bas the editor widget was reciving the drop event instead (Bug #50559), so the file editors drag/drop was disabled.

SO for both to work, somehow the editor needs to accept everything except url drops, and the tabwidget needs to accept only url drops

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Aug 2018 10:19:18 AM UTC, comment #10:

I believe drag and drop was already there (in terms of moving text was handled within the editor itself, now though, it is explictly handled outside of the qscintill widget, which only looks for urls.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 14 Aug 2018 06:16:29 AM UTC, comment #9:

John, I still do not see a relation to the changeset you mentioned in comment #5. file_editor::dragEnterEvent and file_editor::dropEvent (QDropEvent *event) have not changed since changeset http://hg.savannah.gnu.org/hgweb/octave/rev/992b6354c8c6 where the drag & drop functionality was added (except for renaming the event argument).

Aren't local files passed as urls in the event?

Torsten <ttl>
Project Member
Mon 13 Aug 2018 08:51:23 PM UTC, comment #8:

libgui/src/m-editor/file-editor.cc line 1474

adding a e->acceptProposedAction outside of teh if, gets rid of the forbidden circle for me, but nothing happens on release - however the dropevent is also currently processing only urls

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 13 Aug 2018 07:42:08 PM UTC, comment #7:

John, I could not find changes to the dragEnterEvent in the changeset you are referring to in comment #5.

Torsten <ttl>
Project Member
Mon 13 Aug 2018 06:43:19 PM UTC, comment #6:

My comment in comment #1 was wrong.
I was thinking cut and paste.
Sorry.
Doug

Doug Stewart <dastew>
Mon 13 Aug 2018 06:04:04 PM UTC, comment #5:

Quick look at code changes, I think hg.savannah.gnu.org/hgweb/octave/rev/7332287221a9 may have removed the functionality, so that now the only drag events that will work are those with urls.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 13 Aug 2018 05:09:30 PM UTC, comment #4:

And also the non working version I have is qt5 vs qt4 for the working version.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 13 Aug 2018 04:57:13 PM UTC, comment #3:

I have a windows 32bit version of 4.2.1 here on a win10 machine that it does work, and a 64bit 4.2.2 on the same machine that doesn't work.

I cant say 100% if 32 vs 64 bit makes any difference, but mxe-octave did update to the qscintilla 2.10.X versions after octave 4.2.1

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 11 Aug 2018 10:59:12 PM UTC, comment #2:

Does not work at my Win 7 and Mageia 6 Linux box; that is, highlight some text and then drag it around. I see a "forbidden" cursor (circle with 'diagonal' line through it).
Cut/Copy/Paste works fine though.

I wonder if this really ever worked.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 11 Aug 2018 08:20:32 PM UTC, comment #1:

It works in 4.4.

Doug Stewart <dastew>
Sat 11 Aug 2018 07:18:31 PM UTC, original submission:

I seem to remember a time when you could highlight some text in the Editor then drag and drop it somewhere else (in the Editor or Commandline).

Perhaps I'm mistaken. Anyway drag+drop does not work in 4.2.2. Would this be something that could be added?

P.S. Congrats on the GUI! This is really a top class program.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44781:  editordrag.patch added by lostbard (2KiB - 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 marsian (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  •  

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

    Only project members can vote.

     

     

     

    Follow 16 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-19 lostbard StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-09-18 lostbard StatusIn Progress => Ready For Test
    2018-09-10 philipnienhuis Release4.4.1 => dev
        Operating SystemGNU/Linux => Microsoft Windows
    2018-09-08 philipnienhuis StatusFixed => In Progress
        Open/ClosedClosed => Open
    2018-08-17 lostbard StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-08-15 lostbard StatusConfirmed => Ready For Test
        Assigned toNone => lostbard
    2018-08-14 lostbard Attached File- => Added editordrag.patch, #44781
    2018-08-12 mtmiller Carbon-CopyRemoved 80942 => -
    2018-08-12 mtmiller CategoryNone => GUI
        StatusNone => Confirmed
        Release4.2.2 => 4.4.1

    Back to the top


    Powered by Savane 3.3