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(),
|
Separator::new(SeparatorType::Related).widget_holder(),
|
||||||
PopoverButton::new(
|
PopoverButton::new(
|
||||||
"Canvas Navigation",
|
"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(),
|
.widget_holder(),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,6 @@ impl MessageHandler<NavigationMessage, (&Document, Option<[DVec2; 2]>, &InputPre
|
||||||
responses.add(ToolMessage::UpdateCursor);
|
responses.add(ToolMessage::UpdateCursor);
|
||||||
responses.add(ToolMessage::UpdateHints);
|
responses.add(ToolMessage::UpdateHints);
|
||||||
self.transform_operation = TransformOperation::None;
|
self.transform_operation = TransformOperation::None;
|
||||||
responses.add(PortfolioMessage::GraphViewOverlayToggleDisabled { disabled: false });
|
|
||||||
}
|
}
|
||||||
TransformFromMenuEnd { commit_key } => {
|
TransformFromMenuEnd { commit_key } => {
|
||||||
let abort_transform = commit_key == Key::Rmb;
|
let abort_transform = commit_key == Key::Rmb;
|
||||||
|
|
@ -273,9 +272,6 @@ impl MessageHandler<NavigationMessage, (&Document, Option<[DVec2; 2]>, &InputPre
|
||||||
responses.add(FrontendMessage::UpdateInputHints {
|
responses.add(FrontendMessage::UpdateInputHints {
|
||||||
hint_data: HintData(vec![HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, "Abort")])]),
|
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.mouse_position = ipp.mouse.position;
|
||||||
self.transform_operation = TransformOperation::Pan { pre_commit_pan: self.pan };
|
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,
|
snap_zoom_enabled: false,
|
||||||
};
|
};
|
||||||
self.mouse_position = ipp.mouse.position;
|
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,
|
open: bool,
|
||||||
},
|
},
|
||||||
GraphViewOverlayToggle,
|
GraphViewOverlayToggle,
|
||||||
GraphViewOverlayToggleDisabled {
|
|
||||||
disabled: bool,
|
|
||||||
},
|
|
||||||
ImaginateCheckServerStatus,
|
ImaginateCheckServerStatus,
|
||||||
ImaginatePollServerStatus,
|
ImaginatePollServerStatus,
|
||||||
ImaginatePreferences,
|
ImaginatePreferences,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ pub struct PortfolioMessageHandler {
|
||||||
document_ids: Vec<u64>,
|
document_ids: Vec<u64>,
|
||||||
active_document_id: Option<u64>,
|
active_document_id: Option<u64>,
|
||||||
graph_view_overlay_open: bool,
|
graph_view_overlay_open: bool,
|
||||||
graph_view_overlay_toggle_disabled: bool,
|
|
||||||
copy_buffer: [Vec<CopyBufferEntry>; INTERNAL_CLIPBOARD_COUNT as usize],
|
copy_buffer: [Vec<CopyBufferEntry>; INTERNAL_CLIPBOARD_COUNT as usize],
|
||||||
pub persistent_data: PersistentData,
|
pub persistent_data: PersistentData,
|
||||||
pub executor: NodeGraphExecutor,
|
pub executor: NodeGraphExecutor,
|
||||||
|
|
@ -245,13 +244,8 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
||||||
responses.add(FrontendMessage::TriggerGraphViewOverlay { open });
|
responses.add(FrontendMessage::TriggerGraphViewOverlay { open });
|
||||||
}
|
}
|
||||||
PortfolioMessage::GraphViewOverlayToggle => {
|
PortfolioMessage::GraphViewOverlayToggle => {
|
||||||
if !self.graph_view_overlay_toggle_disabled {
|
|
||||||
responses.add(PortfolioMessage::GraphViewOverlay { open: !self.graph_view_overlay_open });
|
responses.add(PortfolioMessage::GraphViewOverlay { open: !self.graph_view_overlay_open });
|
||||||
}
|
}
|
||||||
}
|
|
||||||
PortfolioMessage::GraphViewOverlayToggleDisabled { disabled } => {
|
|
||||||
self.graph_view_overlay_toggle_disabled = disabled;
|
|
||||||
}
|
|
||||||
PortfolioMessage::ImaginateCheckServerStatus => {
|
PortfolioMessage::ImaginateCheckServerStatus => {
|
||||||
let server_status = self.persistent_data.imaginate.server_status().clone();
|
let server_status = self.persistent_data.imaginate.server_status().clone();
|
||||||
self.persistent_data.imaginate.poll_server_check();
|
self.persistent_data.imaginate.poll_server_check();
|
||||||
|
|
@ -544,7 +538,6 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
||||||
fn actions(&self) -> ActionList {
|
fn actions(&self) -> ActionList {
|
||||||
let mut common = actions!(PortfolioMessageDiscriminant;
|
let mut common = actions!(PortfolioMessageDiscriminant;
|
||||||
GraphViewOverlayToggle,
|
GraphViewOverlayToggle,
|
||||||
GraphViewOverlayToggleDisabled,
|
|
||||||
CloseActiveDocumentWithConfirmation,
|
CloseActiveDocumentWithConfirmation,
|
||||||
CloseAllDocuments,
|
CloseAllDocuments,
|
||||||
CloseAllDocumentsWithConfirmation,
|
CloseAllDocumentsWithConfirmation,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue