7477: Users should not be allowed to delete 'default' style in Style Editor
This commit is contained in:
parent
5a1694b981
commit
3e8ca5613e
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user