[meld] undo: Remove state assertions when clearing the undo sequence (ggo#152)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] undo: Remove state assertions when clearing the undo sequence (ggo#152)
- Date: Fri, 19 Jan 2018 20:06:51 +0000 (UTC)
commit 2ac329a94581e742c04e53ae9d9b5dcbb252ebd7
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Jan 19 06:12:44 2018 +1000
undo: Remove state assertions when clearing the undo sequence (ggo#152)
This assertion kind of makes sense, in that you *shouldn't* ever do
this, but on the other hand the clear method here should absolutely work
either way.
This is because there are actually cases where we apparently get a
user-action start without a user-action finish (e.g., in some file
loading error cases). While I'm tempted to argue that this is a bug in
the file load handling (in this case GtkSourceView), we also shouldn't
be crashing here for no good reason.
meld/undo.py | 3 ---
1 file changed, 3 deletions(-)
---
diff --git a/meld/undo.py b/meld/undo.py
index eea229e8..8502eff3 100644
--- a/meld/undo.py
+++ b/meld/undo.py
@@ -90,10 +90,7 @@ class UndoSequence(GObject.GObject):
If the sequence was previously able to undo and/or redo, the
'can-undo' and 'can-redo' signals are emitted.
-
- Raises an AssertionError if a group is in progress.
"""
- assert self.group is None
if self.can_undo():
self.emit('can-undo', 0)
if self.can_redo():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]