forked from 1b-agent/opencadstudio-upstream
Return from Draw submenus with Escape and place split tools last
This commit is contained in:
1 parent
ac8215c1b7
commit
75cc49d629
3 files changed
+29
-11
No files matched your search
@@ -351,6 +351,21 @@ impl Ribbon {
|
||||
self.layer_filter.clear();
|
||||
}
|
||||
|
||||
pub fn escape_extension(&mut self) -> bool {
|
||||
let Some(id) = self.open_dropdown.as_deref() else {
|
||||
return false;
|
||||
};
|
||||
if !draw_panel::owns_dropdown(id) {
|
||||
return false;
|
||||
}
|
||||
if id == draw_panel::PANEL_ID {
|
||||
self.close_dropdown();
|
||||
} else {
|
||||
self.open_dropdown = Some(draw_panel::PANEL_ID.to_string());
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
/// Toggle the flyout of a collapsed ribbon panel (identified by its title).
|
||||
pub fn toggle_collapsed_panel(&mut self, id: &str) {
|
||||
if self.collapsed_open.as_deref() == Some(id) {
|
||||
|
||||
Reference in new issue
Block a user