mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 19:38:12 +08:00
Fix sending platform-specific shortcut keys to frontend before editor is initialized with the platform set
This commit is contained in:
@@ -13,7 +13,7 @@ pub struct LayoutMessageContext<'a> {
|
||||
|
||||
#[derive(Debug, Clone, Default, ExtractField)]
|
||||
pub struct LayoutMessageHandler {
|
||||
layouts: [Layout; LayoutTarget::LayoutTargetLength as usize],
|
||||
layouts: [Layout; LayoutTarget::_LayoutTargetLength as usize],
|
||||
}
|
||||
|
||||
#[message_handler_data]
|
||||
@@ -518,7 +518,8 @@ impl LayoutMessageHandler {
|
||||
LayoutTarget::WelcomeScreenButtons => FrontendMessage::UpdateWelcomeScreenButtonsLayout { diff },
|
||||
LayoutTarget::WorkingColors => FrontendMessage::UpdateWorkingColorsLayout { diff },
|
||||
|
||||
LayoutTarget::LayoutTargetLength => panic!("`LayoutTargetLength` is not a valid Layout Target and is used for array indexing"),
|
||||
// KEEP THIS ENUM LAST
|
||||
LayoutTarget::_LayoutTargetLength => panic!("`_LayoutTargetLength` is not a valid `LayoutTarget` and is used for array indexing"),
|
||||
};
|
||||
|
||||
responses.add(message);
|
||||
|
||||
@@ -56,7 +56,7 @@ pub enum LayoutTarget {
|
||||
|
||||
// KEEP THIS ENUM LAST
|
||||
// This is a marker that is used to define an array that is used to hold widgets
|
||||
LayoutTargetLength,
|
||||
_LayoutTargetLength,
|
||||
}
|
||||
|
||||
/// For use by structs that define a UI widget layout by implementing the layout() function belonging to this trait.
|
||||
|
||||
Reference in New Issue
Block a user