Skip to content

Commit

Permalink
Glitch Fixes
Browse files Browse the repository at this point in the history
* NamingPanel perdía sus inputs si se salia y se volvía a entrar al
  panel.
* SatellitePanel no mostraba los porcentajes de los elementos, y por
  alguna razón al no hacer eso, también duplicaba los satélites.
* Los botones Nuevo, Cargar y Guardar ahora están en inglés como el
  resto del programa.
  • Loading branch information
danielrossyamitrano committed May 1, 2021
1 parent 229fd09 commit 4e4781c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions engine/frontend/widgets/panels/layout_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self, parent, x, y, text):

class SaveButton(BaseButton):
def __init__(self, parent, x, y):
super().__init__(parent, x, y, 'Guardar')
super().__init__(parent, x, y, 'Save')

def on_mousebuttondown(self, event):
if event.button == 1:
Expand All @@ -132,7 +132,7 @@ def on_mousebuttondown(self, event):

class LoadButton(BaseButton):
def __init__(self, parent, x, y):
super().__init__(parent, x, y, 'Cargar')
super().__init__(parent, x, y, 'Load')

def on_mousebuttondown(self, event):
ruta = join(getcwd(), 'data', 'savedata.json')
Expand All @@ -145,7 +145,7 @@ def on_mousebuttondown(self, event):
class NewButton(BaseButton):

def __init__(self, parent, x, y):
super().__init__(parent, x, y, 'Nuevo')
super().__init__(parent, x, y, 'New')

def on_mousebuttondown(self, event):
if event.button == 1 and self.enabled:
Expand Down
5 changes: 1 addition & 4 deletions engine/frontend/widgets/panels/naming_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ def __init__(self, parent):
self.objects = []
self.dummy = DummyType(self)

def show(self):
super().show()
self.add_current()

def hide(self):
super().hide()
self.last_idx = -1
for item in self.unnamed.widgets():
item.hide()

Expand Down
2 changes: 1 addition & 1 deletion engine/frontend/widgets/panels/satellite_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def fill(self, tos=None):
}
super().fill(tos)

for elemento in self.properties.get_widgets_from_layer(7):
for elemento in self.properties.get_widgets_from_layer(2):
got_attr = self.current.composition.get(elemento.text.lower(), 0)
attr = str(round(got_attr, 3)) + ' %'
elemento.value = attr
Expand Down

0 comments on commit 4e4781c

Please sign in to comment.