Remove dead code from overlay graph view state tracking
This commit is contained in:
parent
6ff958d6ae
commit
1bab2affdb
|
|
@ -1590,7 +1590,7 @@ impl DocumentMessageHandler {
|
|||
Separator::new(SeparatorType::Related).widget_holder(),
|
||||
PopoverButton::new(
|
||||
"Canvas Navigation",
|
||||
"Interactive options in this popover menu are coming soon.\nZoom with Shift + MMB Drag or Ctrl + Scroll Wheel Roll.\nRotate with Ctrl + MMB Drag.",
|
||||
"Interactive options in this popover\nmenu are coming soon.\n\nZoom:\n• Shift + Middle Click Drag\n• Ctrl + Scroll Wheel Roll\nRotate:\n• Alt + Left Click Drag",
|
||||
)
|
||||
.widget_holder(),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -252,7 +252,6 @@ impl MessageHandler<NavigationMessage, (&Document, Option<[DVec2; 2]>, &InputPre
|
|||
responses.add(ToolMessage::UpdateCursor);
|
||||
responses.add(ToolMessage::UpdateHints);
|
||||
self.transform_operation = TransformOperation::None;
|
||||
responses.add(PortfolioMessage::GraphViewOverlayToggleDisabled { disabled: false });
|
||||
}
|
||||
TransformFromMenuEnd { commit_key } => {
|
||||
let abort_transform = commit_key == Key::Rmb;
|
||||
|
|
@ -273,9 +272,6 @@ impl MessageHandler<NavigationMessage, (&Document, Option<[DVec2; 2]>, &InputPre
|
|||
responses.add(FrontendMessage::UpdateInputHints {
|
||||
hint_data: HintData(vec![HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, "Abort")])]),
|
||||
});
|
||||
// Because the pan key shares the Spacebar with toggling the graph view overlay, now that we've begun panning,
|
||||
// we need to prevent the graph view overlay from toggling when the control key is pressed.
|
||||
responses.add(PortfolioMessage::GraphViewOverlayToggleDisabled { disabled: true });
|
||||
|
||||
self.mouse_position = ipp.mouse.position;
|
||||
self.transform_operation = TransformOperation::Pan { pre_commit_pan: self.pan };
|
||||
|
|
@ -325,10 +321,6 @@ impl MessageHandler<NavigationMessage, (&Document, Option<[DVec2; 2]>, &InputPre
|
|||
snap_zoom_enabled: false,
|
||||
};
|
||||
self.mouse_position = ipp.mouse.position;
|
||||
|
||||
// Because the zoom key shares the Spacebar with toggling the graph view overlay, now that we've begun zooming,
|
||||
// we need to prevent the graph view overlay from toggling when the control key is pressed.
|
||||
responses.add(PortfolioMessage::GraphViewOverlayToggleDisabled { disabled: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@ pub enum PortfolioMessage {
|
|||
open: bool,
|
||||
},
|
||||
GraphViewOverlayToggle,
|
||||
GraphViewOverlayToggleDisabled {
|
||||
disabled: bool,
|
||||
},
|
||||
ImaginateCheckServerStatus,
|
||||
ImaginatePollServerStatus,
|
||||
ImaginatePreferences,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ pub struct PortfolioMessageHandler {
|
|||
document_ids: Vec<u64>,
|
||||
active_document_id: Option<u64>,
|
||||
graph_view_overlay_open: bool,
|
||||
graph_view_overlay_toggle_disabled: bool,
|
||||
copy_buffer: [Vec<CopyBufferEntry>; INTERNAL_CLIPBOARD_COUNT as usize],
|
||||
pub persistent_data: PersistentData,
|
||||
pub executor: NodeGraphExecutor,
|
||||
|
|
@ -245,12 +244,7 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
|||
responses.add(FrontendMessage::TriggerGraphViewOverlay { open });
|
||||
}
|
||||
PortfolioMessage::GraphViewOverlayToggle => {
|
||||
if !self.graph_view_overlay_toggle_disabled {
|
||||
responses.add(PortfolioMessage::GraphViewOverlay { open: !self.graph_view_overlay_open });
|
||||
}
|
||||
}
|
||||
PortfolioMessage::GraphViewOverlayToggleDisabled { disabled } => {
|
||||
self.graph_view_overlay_toggle_disabled = disabled;
|
||||
responses.add(PortfolioMessage::GraphViewOverlay { open: !self.graph_view_overlay_open });
|
||||
}
|
||||
PortfolioMessage::ImaginateCheckServerStatus => {
|
||||
let server_status = self.persistent_data.imaginate.server_status().clone();
|
||||
|
|
@ -544,7 +538,6 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
|||
fn actions(&self) -> ActionList {
|
||||
let mut common = actions!(PortfolioMessageDiscriminant;
|
||||
GraphViewOverlayToggle,
|
||||
GraphViewOverlayToggleDisabled,
|
||||
CloseActiveDocumentWithConfirmation,
|
||||
CloseAllDocuments,
|
||||
CloseAllDocumentsWithConfirmation,
|
||||
|
|
|
|||
Loading…
Reference in New Issue