libui icon indicating copy to clipboard operation
libui copied to clipboard

Fix table editing redraw code on all platforms.

Open szanni opened this issue 4 years ago • 1 comments

Pretty much all information in the commit message. No uiTableModelRowChanged was emitted on any of the changes when editing cells in uiTable:

This fixes bugs on all platforms not calling uiTableModelRowChanged() when setting a new value in edit mode. This is now automatically done in uiprivTableModelSetValue() so that ALL uiTable views are informed about the update.

Darwin and windows did some custom redrawing which hid this bug. Unix does frequent unrelated redraw which hide the bug. It can often be experienced when double clicking a checkbox.

szanni avatar Aug 25 '20 19:08 szanni

OK, I updated the PR removing the early abort to not trigger an uiTableModelRowChanged call when setting NULL. Not only do button columns use a NULL value, so do color columns... as I found out doing some further code digging.

IMO we should call a uiTableModelRowChanged in any case because we are setting a value so the row technically changed! API abuses to trigger other functionality should be fixed at its root. For example providing a callback handler for a button column or something.

szanni avatar Aug 27 '20 19:08 szanni