Skip to content

Commit

Permalink
If the result is zero, then the string displays zero instead of an em…
Browse files Browse the repository at this point in the history
…pty string
  • Loading branch information
limafresh committed Oct 27, 2024
1 parent 3720517 commit 5398c79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyqulator"
version = "1.7.0"
version = "1.7.1"
dependencies = [
"PyQt6>=6.4.2",
"sympy>=1.13.3",
Expand Down
2 changes: 1 addition & 1 deletion src/pyqulator/create_shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
with open(destination, "w") as desktop_file:
desktop_file.write(desktop_content)

print(f"Shortcut created!")
print("Shortcut created!")
except Exception as e:
print(f"Shortcut was not created: {e}")
else:
Expand Down
2 changes: 2 additions & 0 deletions src/pyqulator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def calculate(self):
self.ui.journal.addItem(f"{expression} = {res}")
except Exception as e:
QMessageBox.warning(self, "Error", str(e))
if self.current_line_result.text() == "":
self.current_line_result.setText("0")

# Clear result line
def clear_line_result(self):
Expand Down

0 comments on commit 5398c79

Please sign in to comment.