mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Remove "OK" from llDialog button list when it's the only element.
"OK" is the default; an empty list works just the same.
This commit is contained in:
parent
6738615360
commit
03c0e326c6
1 changed files with 10 additions and 0 deletions
|
@ -297,6 +297,16 @@ def OptimizeFunc(self, parent, index):
|
|||
del returntypes
|
||||
|
||||
del listarg, idx, value, tvalue, const
|
||||
return
|
||||
|
||||
if name == 'llDialog':
|
||||
if self.GetListNodeLength(child[2]) == 1:
|
||||
button = self.ConstFromNodeOrConst(self.GetListNodeElement(child[2],
|
||||
0))
|
||||
if type(button) == unicode and button == u'OK':
|
||||
# remove the element, as 'OK' is the default button in SL
|
||||
child[2] = {'nt':'CONST','t':'list','value':[],'SEF':True}
|
||||
return
|
||||
|
||||
def FuncOptSetup():
|
||||
# Patch the default values list for LSO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue