Skip to content

Commit

Permalink
Fix action states after subtitle cell editing cancelled
Browse files Browse the repository at this point in the history
And successful editing too, just in case, even though it should result
in a registered action, which updates action states as well.

Closes #30
  • Loading branch information
otsaloma committed Aug 12, 2016
1 parent a46fba5 commit dfc3f40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Gaupol 0.92/1.0
frame-based or vice versa ([#28][])
* [x] Fix error clicking undo or redo button dropdown arrow when no
document is yet open ([#29][])
* [x] Fix action states after subtitle cell editing cancelled ([#30][])

[#28]: https://github.com/otsaloma/gaupol/issues/28
[#29]: https://github.com/otsaloma/gaupol/issues/29
[#30]: https://github.com/otsaloma/gaupol/issues/30
2 changes: 2 additions & 0 deletions gaupol/agents/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,14 @@ def _on_view_renderer_edited(self, renderer, path, value, column):
return page.project.set_duration(row, value)
doc = page.text_column_to_document(col)
page.project.set_text(row, doc, value)
self.update_gui()

@aeidon.deco.export
def _on_view_renderer_editing_canceled(self, *args):
"""Unset state set for editing cell."""
self._set_unsafe_enabled(True)
self.show_message(None)
self.update_gui()

@aeidon.deco.export
def _on_view_renderer_editing_started(self, renderer, editor, path, column):
Expand Down

0 comments on commit dfc3f40

Please sign in to comment.