Skip to content

Table image for TableItems not showing after moving columns #2205

Open
@astro-OT

Description

@astro-OT

Describe the bug
We use a Table with a TableViewer and an ITableLabelProvider.
The table in question has multiple columns and 2 of them contain a picture (column 1 and 4), more specifically the items in those columns.
When the user changes the order of the columns using drag and drop(4->2), the image initially moves with the column. The user then closes the dialog containing the table and re-opens it. The column is displayed in the correct position, but the image is missing! When the column is moved to a position that contains an image (1 or 4) the image is displayed again.

To me this seems like a weird handling of images provided by the ITableLabelProvider, the text is displayed correctly in all columns.

To Reproduce

  • Create a table with multiple columns, some have an image (1,4) for each item, others only have text (0,2,3).
  • Create a solution to save and restore column order.
  • Run application
  • Reorganise table columns and move image column to a position (0,2,3) without image <- still works as expected, all items are displayed correctly
  • Save column order, close and open (restore) table.
  • Items in the moved image column don't display an image <- this is our issue
  • Drag "broken" column to a position with an image (1,4) <- image shows up again for all items

Expected behavior
We expect the images to show up for the table items, no matter the order of the columns. This works fine for texts. Running the same example in Windows leads to the correct behaviour.

Screenshots
X

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    Win10: works
    Linux Kubuntu 24.04: broken
    Cannot test macOS.

  2. JRE/JDK version
    Eclipse Temurin 21.0.3

Version since
Eclipse version: 3.125.0

Workaround (or) Additional context
I tried to find a ticket referencing a similar issue or find changes possibly associated but failed to find any.

The attached file contains some context on how we are utilising the components, but it is not runable as a standalone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions