On mixed-DPI multi-monitor setups, dialog sizes grow each time they are
reopened because logical pixel values change when a window moves between
monitors with different scaling factors. The std::max comparison during
restore guarantees monotonic growth since the DPI-scaled value always
exceeds the previously saved unscaled value.
Store width and height as DIP (device-independent pixels) using ToDIP()
on save and FromDIP() on restore. This makes the persisted size stable
regardless of which monitor the dialog was on when closed. A "dip" flag
in the JSON differentiates new DIP-format values from legacy logical
pixel values, which are converted in place on first load.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20120
When a dialog closes with the mouse hovering over an auxiliary panel
(e.g. the properties panel), focus would land on that panel instead
of the drawing canvas, breaking hotkey operation until the user moved
the mouse back over the canvas.
Set focus directly on the parent frame's tool canvas when closing
dialogs via Show(false) and ShowQuasiModal(), falling back to the
parent window when no canvas is available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20926
When overlay panels are destroyed during panel switching, their UNIT_BINDERs are freed but entries remain in DIALOG_SHIM::m_unitBinders.
Add unregisterUnitBinders() to clean up entries before panel destruction in SetContentPanel().
Fix undo/redo (command + Z) breaking after switching between constraint types. DIALOG_SHIM registers undo/redo handlers only on first paint, so dynamically created panels were never tracked. Solution is to add a protected resetUndoRedoForNewContent() method to DIALOG_SHIM and call it from SetContentPanel() after replacing the content panel.
Break the most expensive header include chains that contaminate the
largest number of translation units
New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
The previous fix added SetMinSize(GetBestSize()) after restoring saved
dialog geometry, but GetBestSize() can return a value constrained by
the current minimum size. Clear the minimum with SetMinSize(wxDefaultSize)
and invalidate the cached best size before recomputing it, matching the
pattern used by PAGED_DIALOG::onPageChanged().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20843
Dialog titles that contain dynamic content like "(1234 items loaded)"
were causing the settings file to be flooded with duplicate entries,
one for each unique title variant.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22851
Remove all wxLogDebug instances by either replacing them with wxLogTrace
calls where it was obvious what the trace flag should be or out right
remove them from the code base.
We never want to hide dialogs if their parent is on a different Space
(MacOS-specific terminology), so set the window property to show
everywhere when showing a dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13906
2d2f443aa4 allowed the use of shift-enter
when creating tables for newlines. However, this should not be applied
to all text controls. We split the ones by IsMultiLine to determine if
the shift-return is a newline or a dialog close
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20866
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
Fixing this required disabling the footprint/3D viewer canvas drawing
before destroying the canvas in the dialog dtor. This in turn required
adding a virtual method to DIALOG_SHIM that can be overridden by the
derived object to allow performing actions during dialog shutdown that
can be problematic when performed in the dialog dtor. Please note that
this only works for quasi-modal dialogs. Modal and modeless dialogs
should use close window events.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18107