Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nheir opened this issue Jul 10, 2019 · 0 comments
Open

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

nheir opened this issue Jul 10, 2019 · 0 comments

Comments

@nheir
Copy link
Contributor

nheir commented Jul 10, 2019

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant