Files
OneCAD-Draft/src/modules/view/count_palette.rs
T
Hakan SevenandClaude Opus 5.5 1d78ab2574 fix(count): invalid-area restore, honest UPDATEFIELD, i18n and SVG icons
- Invalid Area "Undo" reverts the step that lost the boundary (redo after
  an undo, undo otherwise), checks the boundary is back and otherwise puts
  the step back and continues without the area; no auto-undo loop.
- COUNTCLOSE / area replacement remove the count polyline outside the
  history instead of as an undo step of their own.
- UPDATEFIELD re-evaluates the field texts of a table's *T block and
  reports the number actually updated.
- Zoom to a counted object goes through the f64 handle_zoom_to_window.
- Palette: SVG icons instead of glyph text, list cache keyed by tab id,
  cached result borrowed instead of cloned, "Count" as the source text.
- Command-line messages go through t!/tf! with entries in all locales.
- Cleanups: \n escapes, area comment, unused parameter, comment order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 09:33:08 +03:00

12 lines
409 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
use crate::modules::{IconKind, ModuleEvent, ToolDef};
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/data_extract.svg"));
/// View › Palettes › Count: opens or closes the Count palette.
pub fn tool() -> ToolDef {
ToolDef {
id: "COUNTLIST",
label: "Count",
icon: ICON,
event: ModuleEvent::Command("_COUNTLISTTOGGLE".to_string()),
}
}