Skip to content

Commit

Permalink
Require absence of changes for tools
Browse files Browse the repository at this point in the history
When transitioning to the tools menu, require absence of changes. This
is because we need to refresh after leaving the tools menu, but before
returning to the normal mod organizer. If we don't refresh, we could be
looking at downloads that have already been deleted, or missing plugins
that were added by a tool while we were looking at the other menu.
  • Loading branch information
cyberrumor committed Mar 29, 2024
1 parent 9930db3 commit 7eee87e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ammo/mod_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,12 @@ def tools(self) -> None:
"""
Manage tools
"""
if self.changes:
raise Warning("You must commit changes before accessing tools")
tool_controller = ToolController(
self.downloads_dir,
self.game.ammo_conf.parent / "tools",
)
ui = UI(tool_controller)
ui.repl()
self.refresh()

0 comments on commit 7eee87e

Please sign in to comment.