Skip to content

GridViewEditor: Missing redraw when set_cell() with dirty cells #12

Open
@nheir

Description

@nheir

Steps to reproduce:

  • Run the demo_GridViewWidget notebook
  • goto the second example of "Interactive edition of Young tableaux"
  • Replace 10 (or any value) by 9 (a wrong value)
  • Reverse the change

Result:

  • The modified cell stay dirty

image

Expected:

  • All cells are clean

image

This might get more complex with more dirty cells.
It also don't change the set of visible addable/removable cells leading to potential exceptions.

See:

# Success
self.donottrack = True
self.set_value(result)
self.donottrack = False

self.reset_dirty()
if self.donottrack:
return
old_val = change.old
new_val = change.new
actually_changed = (id(new_val) != id(old_val))
if actually_changed:
self.push_history(old_val)
self.compute()
self.draw()

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