Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,6 @@ def operation_click(self, operation):
self.operator = operation
self.current_value = ""

elif self.current_value and self.first_number is None and self.operator is None:
self.first_number = float(self.current_value)
self.operator = operation
self.current_value = ""

elif self.first_number is not None and self.operator is not None and self.current_value:
# validar current_value antes de llamar equals_click
try:
float(self.current_value)
except ValueError:
self.show_error("Número inválido")
return
self.equals_click()
self.first_number = float(self.current_value)
self.operator = operation
self.current_value = ""


def equals_click(self):
"""Calcula el resultado de la operación actual.
Expand Down