Skip to content

Commit

Permalink
Fix error when changing the style of misspelt words
Browse files Browse the repository at this point in the history
In the note editor, changing the style of text failing the spell
check caused an error.  The style tag used by the spell checker
to indicate spelling errors has no tag name.

Fixes #13282.
  • Loading branch information
Nick-Hall committed Jul 8, 2024
1 parent 224f3c0 commit d8a3982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gramps/gui/widgets/styledtextbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def _remove_style_from_selection(self, style):
start, end = self._get_selection()
tags = self._get_tag_from_range(start.get_offset(), end.get_offset())
for tag_name, tag_data in tags.items():
if tag_name.startswith(str(style)):
if tag_name is not None and tag_name.startswith(str(style)):
for start, end in tag_data:
self.remove_tag_by_name(
tag_name,
Expand Down

0 comments on commit d8a3982

Please sign in to comment.