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

This commit is contained in:
Paul Franklin 2014-02-16 11:25:54 -08:00
parent 5a1694b981
commit 3e8ca5613e

View File

@ -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()