Rename event case so its more clear
This commit is contained in:
@@ -79,7 +79,7 @@ impl Console {
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
match event {
|
||||
StackFrameListEvent::ChangedStackFrame => cx.notify(),
|
||||
StackFrameListEvent::SelectedStackFrameChanged => cx.notify(),
|
||||
StackFrameListEvent::StackFramesUpdated => {
|
||||
// TODO debugger: check if we need to do something here
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ impl DebugPanelItem {
|
||||
cx.subscribe(
|
||||
&stack_frame_list,
|
||||
move |this: &mut Self, _, event: &StackFrameListEvent, cx| match event {
|
||||
StackFrameListEvent::ChangedStackFrame => this.clear_highlights(cx),
|
||||
StackFrameListEvent::SelectedStackFrameChanged => this.clear_highlights(cx),
|
||||
_ => {}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::debugger_panel_item::{self, DebugPanelItem};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum StackFrameListEvent {
|
||||
ChangedStackFrame,
|
||||
SelectedStackFrameChanged,
|
||||
StackFramesUpdated,
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ impl StackFrameList {
|
||||
|
||||
if let Some(stack_frame) = this.stack_frames.first() {
|
||||
this.current_stack_frame_id = stack_frame.id;
|
||||
cx.emit(StackFrameListEvent::ChangedStackFrame);
|
||||
cx.emit(StackFrameListEvent::SelectedStackFrameChanged);
|
||||
}
|
||||
|
||||
this.list.reset(this.stack_frames.len());
|
||||
@@ -221,7 +221,7 @@ impl StackFrameList {
|
||||
|
||||
cx.notify();
|
||||
|
||||
cx.emit(StackFrameListEvent::ChangedStackFrame);
|
||||
cx.emit(StackFrameListEvent::SelectedStackFrameChanged);
|
||||
}
|
||||
}))
|
||||
.hover(|s| s.bg(cx.theme().colors().element_hover).cursor_pointer())
|
||||
|
||||
@@ -128,7 +128,7 @@ impl VariableList {
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
match event {
|
||||
StackFrameListEvent::ChangedStackFrame => {
|
||||
StackFrameListEvent::SelectedStackFrameChanged => {
|
||||
self.build_entries(true, false, cx);
|
||||
}
|
||||
StackFrameListEvent::StackFramesUpdated => {
|
||||
|
||||
Reference in New Issue
Block a user