fix: correct PageSetup paper size when layout origin is non-zero
paper_limits() can return a non-zero origin (e.g. when min_limits has negative margin values). PageSetup was using x1/y1 directly instead of (x1-x0)/(y1-y0), giving wrong dimensions in those cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3298ebff91
commit
fad7b16d5f
1 changed files with 2 additions and 2 deletions
|
|
@ -2668,8 +2668,8 @@ impl H7CAD {
|
|||
Message::PageSetupOpen => {
|
||||
let i = self.active_tab;
|
||||
// Populate edit buffers from current paper limits.
|
||||
let (w, h) = if let Some(((_, _), (x1, y1))) = self.tabs[i].scene.paper_limits() {
|
||||
(x1, y1)
|
||||
let (w, h) = if let Some(((x0, y0), (x1, y1))) = self.tabs[i].scene.paper_limits() {
|
||||
(x1 - x0, y1 - y0)
|
||||
} else {
|
||||
(297.0, 210.0) // A4 default
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue