7477: Users should not be allowed to delete 'default' style in Style Editor

This commit is contained in:
Paul Franklin 2014-02-16 11:27:29 -08:00
parent a2807dff79
commit afd7b2c048

View File

@ -155,6 +155,8 @@ class StyleListDisplay(object):
return
name = cuni(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)
@ -164,6 +166,8 @@ class StyleListDisplay(object):
if not node:
return
name = cuni(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()