forked from 1b-agent/opencadstudio-upstream
Keep rotation prompt visible with arc label
This commit is contained in:
1 parent
7edf268eef
commit
0f337db488
2 files changed
+11
-5
No files matched your search
+4
-2
@@ -851,8 +851,10 @@ impl OpenCADStudio {
|
|||||||
tab.scene.active_model_tile_bounds(vw, vh),
|
tab.scene.active_model_tile_bounds(vw, vh),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
camera.project(world, bounds).map(|point| {
|
camera.project(world, bounds).and_then(|point| {
|
||||||
iced::Point::new(bounds.x + point.x, bounds.y + point.y)
|
(point.x.is_finite() && point.y.is_finite()).then(|| {
|
||||||
|
iced::Point::new(bounds.x + point.x, bounds.y + point.y)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// A command may drive a typed scalar by mouse (e.g. a
|
// A command may drive a typed scalar by mouse (e.g. a
|
||||||
|
|||||||
+7
-3
@@ -2755,6 +2755,13 @@ impl DynInputCanvas {
|
|||||||
let mut x = bx;
|
let mut x = bx;
|
||||||
for (i, b) in self.boxes.iter().enumerate() {
|
for (i, b) in self.boxes.iter().enumerate() {
|
||||||
let w = widths[i];
|
let w = widths[i];
|
||||||
|
if b.role == DynRole::Angle {
|
||||||
|
if let Some(center) = self.label_screen {
|
||||||
|
Self::draw_box(frame, b, center, bounds, theme);
|
||||||
|
x += w + DYN_GAP;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
let rect =
|
let rect =
|
||||||
canvas::Path::rectangle(Point { x, y: by }, Size { width: w, height: DYN_BOX_H });
|
canvas::Path::rectangle(Point { x, y: by }, Size { width: w, height: DYN_BOX_H });
|
||||||
let (fill, border, text) = Self::box_colors(b, theme);
|
let (fill, border, text) = Self::box_colors(b, theme);
|
||||||
@@ -2850,9 +2857,6 @@ impl canvas::Program<Message> for DynInputCanvas {
|
|||||||
|
|
||||||
// Guided layouts need the anchor; without it fall back to a cursor row.
|
// Guided layouts need the anchor; without it fall back to a cursor row.
|
||||||
match (self.guide, self.base_screen) {
|
match (self.guide, self.base_screen) {
|
||||||
(DynGuide::None, Some(base)) if self.label_screen.is_some() => {
|
|
||||||
self.draw_guided(&mut frame, bounds, base, theme)
|
|
||||||
}
|
|
||||||
(DynGuide::None, _) | (_, None) => self.draw_row(&mut frame, bounds, theme),
|
(DynGuide::None, _) | (_, None) => self.draw_row(&mut frame, bounds, theme),
|
||||||
(_, Some(base)) => self.draw_guided(&mut frame, bounds, base, theme),
|
(_, Some(base)) => self.draw_guided(&mut frame, bounds, base, theme),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user