1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

click_counter: Cast value to int() for saving

This commit is contained in:
Athanasius 2021-11-22 10:57:46 +00:00
parent 71ed90fb3a
commit fe55eb11f8
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -77,7 +77,9 @@ class ClickCounter:
:param cmdr: The current ED Commander
:param is_beta: Whether or not EDMC is currently marked as in beta mode
"""
config.set('click_counter_count', self.click_count.get()) # type: ignore
# You need to cast to `int` here to store *as* an `int`, so that
# `config.get_int()` will work for re-loading the value.
config.set('click_counter_count', int(self.click_count.get())) # type: ignore
def setup_main_ui(self, parent: tk.Frame) -> tk.Frame:
"""