Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if not actions: actions = []
if not columns: columns = []
if data == None: data = []
if not empty: empty = []
try:
PropertyEditor.instances[text]
except KeyError:
PropertyEditor.instances[text] = \
PropertyEditor().__private_init__(text, columns, data, empty, add_actions, actions)
try:
PropertyEditor.instances[text].this.setLocation(PropertyEditor.locations[text])
except KeyError:
if PropertyEditor.last_location:
PropertyEditor.instances[text].this.setLocation(
PropertyEditor.last_location.x+PropertyEditor.offset,
PropertyEditor.last_location.y+PropertyEditor.offset)
PropertyEditor.offset = PropertyEditor.NEW_WINDOW_OFFSET
try:
PropertyEditor.instances[text].this.setSize(PropertyEditor.sizes[text])
except KeyError:
if PropertyEditor.last_size:
PropertyEditor.instances[text].this.setSize(PropertyEditor.last_size)
PropertyEditor.last_location = PropertyEditor.instances[text].this.getLocation()
PropertyEditor.last_size = PropertyEditor.instances[text].this.getSize()
## Hack ON: Bring on Front
PropertyEditor.instances[text].this.setAlwaysOnTop(True)
PropertyEditor.instances[text].this.setAlwaysOnTop(False)
## Hack OFF
return PropertyEditor.instances[text]
PropertyEditor.instances[text] = \
PropertyEditor().__private_init__(text, columns, data, empty, add_actions, actions)
try:
PropertyEditor.instances[text].this.setLocation(PropertyEditor.locations[text])
except KeyError:
if PropertyEditor.last_location:
PropertyEditor.instances[text].this.setLocation(
PropertyEditor.last_location.x+PropertyEditor.offset,
PropertyEditor.last_location.y+PropertyEditor.offset)
PropertyEditor.offset = PropertyEditor.NEW_WINDOW_OFFSET
try:
PropertyEditor.instances[text].this.setSize(PropertyEditor.sizes[text])
except KeyError:
if PropertyEditor.last_size:
PropertyEditor.instances[text].this.setSize(PropertyEditor.last_size)
PropertyEditor.last_location = PropertyEditor.instances[text].this.getLocation()
PropertyEditor.last_size = PropertyEditor.instances[text].this.getSize()
## Hack ON: Bring on Front
PropertyEditor.instances[text].this.setAlwaysOnTop(True)
PropertyEditor.instances[text].this.setAlwaysOnTop(False)
## Hack OFF
return PropertyEditor.instances[text]
:param actions: default set of actions to be appended to Add and Delete Rows
:return: a new instance of PropertyEditor or a reused one.
"""
if not actions: actions = []
if not columns: columns = []
if data == None: data = []
if not empty: empty = []
try:
PropertyEditor.instances[text]
except KeyError:
PropertyEditor.instances[text] = \
PropertyEditor().__private_init__(text, columns, data, empty, add_actions, actions)
try:
PropertyEditor.instances[text].this.setLocation(PropertyEditor.locations[text])
except KeyError:
if PropertyEditor.last_location:
PropertyEditor.instances[text].this.setLocation(
PropertyEditor.last_location.x+PropertyEditor.offset,
PropertyEditor.last_location.y+PropertyEditor.offset)
PropertyEditor.offset = PropertyEditor.NEW_WINDOW_OFFSET
try:
PropertyEditor.instances[text].this.setSize(PropertyEditor.sizes[text])
except KeyError:
if PropertyEditor.last_size:
PropertyEditor.instances[text].this.setSize(PropertyEditor.last_size)
PropertyEditor.last_location = PropertyEditor.instances[text].this.getLocation()
PropertyEditor.last_size = PropertyEditor.instances[text].this.getSize()
## Hack ON: Bring on Front
PropertyEditor.instances[text].this.setAlwaysOnTop(True)
PropertyEditor.instances[text].this.setAlwaysOnTop(False)
## Hack OFF
return PropertyEditor.instances[text]
"""
if not actions: actions = []
if not columns: columns = []
if data == None: data = []
if not empty: empty = []
try:
PropertyEditor.instances[text]
except KeyError:
PropertyEditor.instances[text] = \
PropertyEditor().__private_init__(text, columns, data, empty, add_actions, actions)
try:
PropertyEditor.instances[text].this.setLocation(PropertyEditor.locations[text])
except KeyError:
if PropertyEditor.last_location:
PropertyEditor.instances[text].this.setLocation(
PropertyEditor.last_location.x+PropertyEditor.offset,
PropertyEditor.last_location.y+PropertyEditor.offset)
PropertyEditor.offset = PropertyEditor.NEW_WINDOW_OFFSET
try:
PropertyEditor.instances[text].this.setSize(PropertyEditor.sizes[text])
except KeyError:
if PropertyEditor.last_size:
PropertyEditor.instances[text].this.setSize(PropertyEditor.last_size)
PropertyEditor.last_location = PropertyEditor.instances[text].this.getLocation()
PropertyEditor.last_size = PropertyEditor.instances[text].this.getSize()
## Hack ON: Bring on Front
PropertyEditor.instances[text].this.setAlwaysOnTop(True)
PropertyEditor.instances[text].this.setAlwaysOnTop(False)
## Hack OFF
return PropertyEditor.instances[text]