Skip to content

Fix and refactor editor puzzle import

Fixes #227 (closed)

Previously:

  • Importing a puzzle from the greeter was broken. The greeter used a PuzzleDownloader to open a file dialog, but it didn't register a listener for the finished signal. So nothing happened after the user selected a file.
  • Importing from the edit window worked.
    • The edit window handled the importing on its own, instead of relying on a PuzzleDownloader.
    • It only supported IPUZ files, as opposed to PuzzleDownloader, which supports other file types.
    • It didn't open the new puzzle in a new window.

For this MR:

  • I created an edit_window_start_with_file_explorer function. This function does the following:
    1. Present the user with a file explorer.
    2. Start a new edit window using the puzzle selected by the user.
    3. Close the previous window (either a greeter or an edit window).
  • Both the greeter and edit window now use this function to handle puzzle imports.

Merge request reports

Loading