robotframework / RIDE

Test data editor for Robot Framework
Apache License 2.0
951 stars 375 forks source link

[Grid Editor] Shortcut keys operations on a multiple selected cells impact the first row's cell #2796

Closed ZDabrowski closed 3 weeks ago

ZDabrowski commented 1 month ago

The Grid shortcut keys operations on a multiple cells' selection impacts also the first row's cell. It can be observed when using CTRL+SHIFT+I, CTRL+SHIFT+D, but also CTRL+X/CTRL+V.

Environment Python 3.10.12 wxPython 4.2.1 robotframework 6.0.2 robotframework-ride 2.1.dev45 Ubuntu 22.04.4 LTS

Steps

  1. Select a minimum 2 cells - horizontal/vertical selection, for example (1,5:1,6). obraz
  2. Press shortcut CTRL+SHIFT+I to insert cells. The cell (1,1) was also moved. obraz
  3. Select cells (1,5:1,6) again and then press shortcut CTRL+SHIFT+D to delete those cells. The cell (1,1) was also removed. obraz
  4. Select cells (1,5:1,6) again and press CTRL+SHIF+D to delete cells. The cell (1,1) was also moved. obraz

I suppose, that the other operations have the same root cause. Additionally, the cut/paste operation of multiple cells (CTRL+X/CTL-V), incorrectly copied a value from cell (1,1) instead of previously selected cells.

  1. Select cells (1,4:2,5) obraz
  2. Cut selection. Noticed that the "active cell indicator" moves to the (1,1) grid position. obraz
  3. Paste the code to 9th row. Instead of (1,4:2,5) cells, there is an unexpected value from the (1,1) cell. obraz

Additional info Sample of code:

*** Test Cases ***
Test Rows
    Comment    First Line
    Run Keyword And Ignore Error    1
    Run Keyword And Ignore Error    2
    Run Keyword And Ignore Error    3
    Run Keyword And Ignore Error    4
    Run Keyword And Ignore Error    5
    Run Keyword And Ignore Error    6
    Run Keyword And Ignore Error    7
HelioGuilherme66 commented 3 weeks ago

@ZDabrowski The first problem is fixed, but not the Ctrl-X/Ctrl-V and also Move Rows actions (Alt-Up/Alt-Down). Need to recover some code from a branch. Tested on: Environment Python 3.12.3 (Virtual Env) wxPython 4.2.2a1.dev5626+a1184286 Robot Framework 7.0 RIDE v2.1dev48 (needed a fix for #2793) Fedora 40 (KDE/Plasma)

HelioGuilherme66 commented 3 weeks ago

Still missing CTRL-X action :(

HelioGuilherme66 commented 3 weeks ago

Fixed in v2.1dev50.