Skip to content

Fix wrong ratio on init

Sankhesh Jhaveri requested to merge fix_wrong_ratio_on_init into master

PR for #1795 ; still fails on Diagnostics tests.

The diagnostics tests fail because:

  1. diagnostics calls canvas.portrait()
  2. canvas.portrait() calls backend.portrait() with height/width from updated canvasinfo function
  3. backend.portrait() calls backend.resize_or_rotate_window with height/width
  4. backend.resize_or_rotate_window sets bgX and bgY with the updated height/width
  5. 🐞

I'm probably going to try updating canvas.portrait to just update the size attribute on the canvas if height/width was not specified; that will make all of the output functions correctly flip the dimensions when needed, and prevent the vicious chain of bugs.

Merge request reports