Honor point display geometry and sizing

This commit is contained in:
ramox81 committed 2026-08-22 17:18:30 +03:00
1 parent ba9f36adb2
commit c5fe70627a
10 files changed
+238 -60

No files matched your search

+1 -1
View File
@@ -2309,7 +2309,7 @@ impl OpenCADStudio {
use crate::command::ValuePromptCommand;
let c = ValuePromptCommand::new(
"PDSIZE",
"PDSIZE new point size (0 = 5% of viewport, <0 = absolute):",
"PDSIZE new point size (0 = 5% of viewport, >0 = absolute, <0 = viewport percentage):",
);
self.command_line.push_info(&c.prompt());
self.tabs[i].active_cmd = Some(Box::new(c));
+2 -1
View File
@@ -341,8 +341,9 @@ impl OpenCADStudio {
.abs();
if !self.point_size_relative && mag == 0.0 {
let wpp = self.tabs[i].scene.world_per_pixel().unwrap_or(0.0);
let viewport_height = self.tabs[i].scene.selection.borrow().vp_size.1;
mag = if wpp > 0.0 {
crate::entities::point::relative_world_size(0.0, wpp)
crate::entities::point::relative_world_size(0.0, wpp, viewport_height)
} else {
1.0
};