Skip to content

Commit

Permalink
Cart explorer: initialize cart timestamps as an empty list instead of…
Browse files Browse the repository at this point in the history
… None.

Rather than using None to initialize cart edit timestamp, initialize it as an empty list. Also, when closing Studio app module, reset edit timestamps as an empty list.
This will be backported to LTS20.
  • Loading branch information
josephsl committed Jan 23, 2021
1 parent 5ff93b3 commit ca0260c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addon/appModules/splstudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ def terminate(self):
self.carts.clear()
self._cachedStatusObjs.clear()
# Don't forget to reset timestamps for cart files.
splmisc._cartEditTimestamps = None
splmisc._cartEditTimestamps = []
# Just to make sure:
if splbase._SPLWin:
splbase._SPLWin = None
Expand Down Expand Up @@ -1609,7 +1609,7 @@ def script_toggleCartExplorer(self, gesture):
self.cartExplorer = False
self.cartsBuilder(build=False)
self.carts.clear()
splmisc._cartEditTimestamps = None
splmisc._cartEditTimestamps = []
# Translators: Presented when cart explorer is off.
ui.message(_("Exiting cart explorer"))

Expand Down
2 changes: 1 addition & 1 deletion addon/appModules/splstudio/splmisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _populateCarts(carts, cartlst, modifier, standardEdition=False, refresh=Fals


# Cart file timestamps.
_cartEditTimestamps = None
_cartEditTimestamps = []


# Initialize Cart Explorer i.e. fetch carts.
Expand Down

0 comments on commit ca0260c

Please sign in to comment.