From 3e8ca5613eb2b625dec8ffd870a8bde2ffa6420b Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sun, 16 Feb 2014 11:25:54 -0800 Subject: [PATCH] 7477: Users should not be allowed to delete 'default' style in Style Editor --- src/gui/plug/report/_styleeditor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/plug/report/_styleeditor.py b/src/gui/plug/report/_styleeditor.py index fe55175b2..9e7518e2f 100644 --- a/src/gui/plug/report/_styleeditor.py +++ b/src/gui/plug/report/_styleeditor.py @@ -159,6 +159,8 @@ class StyleListDisplay(object): return name = unicode(self.list.model.get_value(node, 0)) + if name == 'default': # the default style cannot be edited + return style = self.sheetlist.get_style_sheet(name) StyleEditor(name, style, self) @@ -168,6 +170,8 @@ class StyleListDisplay(object): if not node: return name = unicode(self.list.model.get_value(node, 0)) + if name == 'default': # the default style cannot be removed + return self.sheetlist.delete_style_sheet(name) self.redraw()