Repository: GraphiteEditor/Graphite
File: editor/src/messages/portfolio/menu_bar/menu_bar_message_handler.rs (Rust)

Code before:
							},
							MenuBarEntry {
								label: "Lower".into(),
								shortcut: action_keys!(DocumentMessageDiscriminant::SelectedLayersLower),
								action: MenuBarEntry::create_action(|_| DocumentMessage::SelectedLayersLower.into()),
								disabled: no_active_document,
								..MenuBarEntry::default()
							},
							MenuBarEntry {
								label: "Lower to Back".into(),
								shortcut: action_keys!(DocumentMessageDiscriminant::SelectedLayersLowerToBack),
								action: MenuBarEntry::create_action(|_| DocumentMessage::SelectedLayersLowerToBack.into()),
								disabled: no_active_document,
								..MenuBarEntry::default()
							},
						]]),
						..MenuBarEntry::default()
					}],
				]),
			),
			MenuBarEntry::new_root(
				"Document".into(),
				no_active_document,
				MenuBarEntryChildren(vec![vec![MenuBarEntry {
					label: "Clear Artboards".into(),
					action: MenuBarEntry::create_action(|_| GraphOperationMessage::ClearArtboards.into()),
					disabled: no_active_document,
					..MenuBarEntry::default()
				}]]),
			),
			MenuBarEntry::new_root(
				"View".into(),
				no_active_document,
				MenuBarEntryChildren(vec![
					vec![
						MenuBarEntry {
							label: "Tilt".into(),
							shortcut: action_keys!(NavigationMessageDiscriminant::RotateCanvasBegin),
							action: MenuBarEntry::create_action(|_| NavigationMessage::RotateCanvasBegin { was_dispatched_from_menu: true }.into()),
							disabled: no_active_document,
							..MenuBarEntry::default()
						},
						MenuBarEntry {
							label: "Reset Tilt".into(),
							shortcut: action_keys!(NavigationMessageDiscriminant::SetCanvasRotation),
							action: MenuBarEntry::create_action(|_| NavigationMessage::SetCanvasRotation { angle_radians: 0.into() }.into()),
							disabled: no_active_document,
							..MenuBarEntry::default()
						},
					],
					vec![

Review comment (bug):
This was disabled because it crashes (as it wasn't ported to document nodes). And with this PR (at least on my computer) this still does crash. So I'll revert this line for now so it doesn't hold up the rest of the PR which I'm merging now.

Code after:
							},
							MenuBarEntry {
								label: "Lower".into(),
								shortcut: action_keys!(DocumentMessageDiscriminant::SelectedLayersLower),
								action: MenuBarEntry::create_action(|_| DocumentMessage::SelectedLayersLower.into()),
								disabled: no_active_document,
								..MenuBarEntry::default()
							},
							MenuBarEntry {
								label: "Lower to Back".into(),
								shortcut: action_keys!(DocumentMessageDiscriminant::SelectedLayersLowerToBack),
								action: MenuBarEntry::create_action(|_| DocumentMessage::SelectedLayersLowerToBack.into()),
								disabled: no_active_document,
								..MenuBarEntry::default()
							},
						]]),
						..MenuBarEntry::default()
					}],
				]),
			),
			MenuBarEntry::new_root(
				"Document".into(),
				no_active_document,
				MenuBarEntryChildren(vec![vec![MenuBarEntry {
					label: "Clear Artboards".into(),
					action: MenuBarEntry::create_action(|_| DialogMessage::RequestComingSoonDialog { issue: None }.into()),
					disabled: no_active_document,
					..MenuBarEntry::default()
				}]]),
			),
			MenuBarEntry::new_root(
				"View".into(),
				no_active_document,
				MenuBarEntryChildren(vec![
					vec![
						MenuBarEntry {
							label: "Tilt".into(),
							shortcut: action_keys!(NavigationMessageDiscriminant::RotateCanvasBegin),
							action: MenuBarEntry::create_action(|_| NavigationMessage::RotateCanvasBegin { was_dispatched_from_menu: true }.into()),
							disabled: no_active_document,
							..MenuBarEntry::default()
						},
						MenuBarEntry {
							label: "Reset Tilt".into(),
							shortcut: action_keys!(NavigationMessageDiscriminant::SetCanvasRotation),
							action: MenuBarEntry::create_action(|_| NavigationMessage::SetCanvasRotation { angle_radians: 0.into() }.into()),
							disabled: no_active_document,
							..MenuBarEntry::default()
						},
					],
					vec![