Skip to content

[Grid Editor] Subsequent shortcut key action works only on the top row of the selection #2815

Closed

Description

@ZDabrowski

A first shortcut key operation on a multiple cells' selection works properly.
However, any subsequent operation impacts only the top row of the selection.
It can be observed when using CTRL+SHIFT+I, CTRL+SHIFT+D, but also ALT+Up/ALT+Down.

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

Steps

  1. Select multiple cells
    obraz
  2. Press shortcut CTRL+SHIFT+I to insert cells. (OK)
    obraz
  3. Press CTRL+SHIFT+I again. The action only occurred on the top row of the selection.
    obraz
  4. Select multiple cells again. (refresh selection)
  5. Press shortcut CTRL+SHIFT+D to remove multiple cells. (OK)
    obraz
  6. Press shortcut CTRL+SHIFT+I to insert cells. The action only occurred on the top row of the selection.
    obraz

ALT+Up scenario:

  1. Select cells
    obraz
  2. Press ALT+Up (OK)
    obraz
  3. Press ALT+Up again. Only "4th line" moved up.
    obraz

Additional info
It looks like an active selection persist in cache only for one action.

*** Test Cases ***
Test Rows
    Log    1st line
    Log    2nd line
    Log    3rd line
    Log    4th line

Activity

  1. added
    os: linux
    prio-high
    bug
    on Jun 30, 2024
  2. added
    WORK IN PROGRESS
    and removed
    os: linux
    on Jul 9, 2024
  3. added this to the v2.1 milestone on Jul 17, 2024
  4. added
    fixed
    and removed
    WORK IN PROGRESS
    on Jul 17, 2024
  5. HelioGuilherme66 commented on Jul 17, 2024

    @HelioGuilherme66
    Member

    @ZDabrowski This one was a hard one to find, and I am not still totally convinced of the fix. In some situations, the Cursor (the highlighted cell), is lost even if the selection remains. When this happens, wxWidgets (from C++ core), returns the error:
    (__init__.py:15846): Gtk-CRITICAL **: 02:05:36.930: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
    This means it does not know where the key press happened.

    I fixed the Ctrl-X in Linux (need to test in Windows), but I did see the bad behavior when doing a lot of actions in a short period of time.
    🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfixedprio-high

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions