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