Skip to content

Updates and bug fixes - #269

Open
shred86 wants to merge 155 commits into
oscarpilote:masterfrom
shred86:dev
Open

Updates and bug fixes#269
shred86 wants to merge 155 commits into
oscarpilote:masterfrom
shred86:dev

Conversation

@shred86

@shred86 shred86 commented Jun 16, 2024

Copy link
Copy Markdown

I ended up closing my other pull requests since I've continued to work on Ortho4XP in my fork and there's enough changes that it's becoming difficult to manage the changes across two base branches. I'm creating this pull request which will includes all of the updates I've made and I'll try my best to make sure I provide detailed documentation. I'm continuing to work on this so I'll keep updating the documentation as I go along.

At a high level, my focus has been on:

  1. Accessibility - Setting up Ortho4XP can be a bit challenging, especially for folks that don't work with Python but using PyInstaller, this makes it much easier for folks to get up and running.
  2. Usability - This comes from making the application intuitive for users and providing documentation. The changes I've been making are based on my experience working with Ortho4XP and trying to make it more intuitive and easier to use. I've also created documentation on my forks Wiki which I opened an issue on this repo to propose merging everything here into the official version.
  3. Maintainability - Trying to incorporate logger, using docstrings, typing, refactoring and eventually writing tests with the goal on making it easier for development purposes and troubleshooting.

I've documented all of the changes in the read me.

Development Notes

  • All data related to tile configuration and application configuration remains unchanged. The global tile configuration settings are now stored in the Python global variables using the same names as previous except with a "global_" prefix. They are also stored in self.v_ with the same prefix.
  • Moved cfg_vars to its own module, O4_Cfg_Vars.py
  • Using reST docstrings, typing and Black for formatting.
  • Added logger to start help with development and troubleshooting.
  • Added a lot of comments to help with development.

Todo

  • Continue to incorporate logger to catch exceptions.
  • Figure out if there's a way to save GUI params if the application is closed using "Exit" in macOS (SIGTERM or SIGINT). Doing some research, it sounds like this might be a limitation of macOS and Python.
  • Write unit tests.

shred86 and others added 30 commits June 3, 2024 16:14
fix issue with convert_texture
separate O4XP data from libraries when using PyInstaller
Add zoom level asterisk, erase cached data feedback and fix symlink bug
Fix issue with zone_list saving in tile configuration, save on exit and versioning
include gdal for linux
shred86 and others added 30 commits March 29, 2026 09:24
Move tile.dem = DEM.DEM(...) from inside include_airports to the top
of build_poly_file. The DEM has no data dependency on OSM data, but
nesting the load after the OSM airport query meant any Overpass
failure (timeout, 5xx) left tile.dem = None, crashing later
include_water with AttributeError: 'NoneType' object has no
attribute 'alt_vec'.

Failure mode scaled with OSM query density, hitting India and China
tiles disproportionately.

Refs: #89
Commit d1f34a4 added the same macOS mouse-binding block to both
Ortho4XP_Custom_ZL and Ortho4XP_Earth_Preview, including a binding to
self.delPol. That method only exists on Ortho4XP_Custom_ZL, so opening
the Tiles Collection / Earth preview window on macOS with Python <= 3.12
raised AttributeError in __init__ and the window never opened.

Remove the stray binding; the Earth preview has no polygon-delete
action. The scroll bindings the block legitimately provides are kept.

Fixes #91

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix Earth preview crash on macOS with Python <= 3.12 (nonexistent self.delPol binding)
Fix tile.dem=None crash when Overpass airport query fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants