cad-editor/src/ui
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 8f9fe5226b fix(ribbon): clear blue tool state when its popup window closes (#40)
A ribbon tool that opens a popup window (LAYERS, PAGESETUP,
ABOUT, the style managers, …) marks itself blue via
\`activate_tool\` when the user clicks it, but nothing un-marked
the tool after the window was dismissed — \`OsWindowClosed\`
cleared the matching \`_window\` slot, the active-tool string
stayed put, and the button kept rendering as if the panel were
still open.

Add \`Ribbon::deactivate_tool_if(id)\` (clears only when the
active tool matches) and call it for every popup-window slot in
\`OsWindowClosed\`. Also clear inside the \`ToggleLayers\` close
branch — that path \`take()\`s \`layer_window\` to \`None\` before
\`OsWindowClosed\` fires, so the conditional in the
\`OsWindowClosed\` handler would miss the close otherwise.

Mapped IDs match the matching ribbon \`ToolDef.id\`s (LAYERS,
PAGESETUP, ABOUT) plus command names for the popups normally
opened via the command line (TEXTSTYLE, TABLESTYLE, MLSTYLE,
LAYOUTMANAGER / LAYOUTPANEL, PLOTSTYLE / STYLESMANAGER, DIMSTYLE,
SHORTCUTS / KEYBOARD) so a future ribbon tool with one of those
ids gets the same correct deactivate.

Closes #40
2026-05-29 01:23:25 +03:00
..
ribbon fix(ribbon): clear blue tool state when its popup window closes (#40) 2026-05-29 01:23:25 +03:00
about.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
app_menu.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
command_line.rs feat(dyn-input): TAB-editable distance/angle/coordinate fields 2026-05-27 14:08:57 +03:00
dimstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
layers.rs chore: remove dead UI helpers and orphan toolbar stubs 2026-05-16 00:04:44 +03:00
layout_manager.rs cargo fmt 2026-05-12 10:36:15 +03:00
mlstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
mod.rs feat: in-app update notice — checks GitHub releases on startup 2026-05-16 19:55:57 +03:00
open_progress.rs feat(io): show loading overlay while opening CAD files 2026-05-13 09:59:07 +03:00
overlay.rs fix(overlay): hide system cursor over viewport, drop CAD over divider 2026-05-28 19:52:34 +03:00
page_setup.rs cargo fmt 2026-05-12 10:36:15 +03:00
plotstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
properties.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
scale_popup.rs feat: correct viewport scale calculation with correct dimension and text scaling 2026-05-19 00:26:08 +03:00
shortcuts.rs cargo fmt 2026-05-12 10:36:15 +03:00
snap_popup.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
statusbar.rs fix(polyline): correct wide-polyline fill band arc center + add LWDISPLAY toggle 2026-05-23 07:15:26 +03:00
tablestyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
textstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
update_notice.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00