mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-13 19:01:21 +00:00
feat(speed-dial): add plugin page capabilities as actions
Plugin Pages capabilities (top-level notebook tabs) were missing from the Speed Dial because ActionRegistry only ingested Script capabilities. Enumerate and subscribe to Pages as well. Launching a page action switches the notebook to that page, swapping it into the visible slot first when it lives behind the overflow dropdown.
This commit is contained in:
@@ -400,6 +400,17 @@ void PluginPages::relayout()
|
||||
}
|
||||
}
|
||||
|
||||
void PluginPages::select_page(const PluginCapabilityId& id)
|
||||
{
|
||||
if (m_parent == nullptr || m_pages.find(id) == m_pages.end())
|
||||
return;
|
||||
|
||||
// Swap the page into the visible slot first when it lives behind the overflow menu.
|
||||
m_swapped_in_id = id;
|
||||
relayout();
|
||||
m_parent->SelectPageByName(page_tab_id(id));
|
||||
}
|
||||
|
||||
void PluginPages::show_overflow_menu()
|
||||
{
|
||||
const int visible_slots = std::max(1, m_visible_page_count);
|
||||
|
||||
Reference in New Issue
Block a user