refactor(ribbon): derive the Block Palette button highlight from app state

The ribbon kept its own \show_block_palette\ copy that the app had to
manually sync at every mutation point (the BLOCKPALETTE command and the
dock Close handler). Drop the copy and thread the app's authoritative
\show_block_palette\ into \Ribbon::view\ at render time, so the button
highlight can't drift from the panel's true visibility — those two
handlers are now mutate-points only and the ribbon view is the single
place that reads the state back.
This commit is contained in:
Karim Jerbi committed 2026-08-15 14:42:08 +01:00
1 parent c3e3132b39
commit b4da342f0e
4 files changed
+27 -12

No files matched your search

+1
View File
@@ -1742,6 +1742,7 @@ impl OpenCADStudio {
self.tabs[self.active_tab].is_start,
self.tabs[self.active_tab].history.undo_stack.len(),
self.tabs[self.active_tab].history.redo_stack.len(),
self.show_block_palette,
));
}
if self.show_file_tabs {