Rename event case so its more clear

This commit is contained in:
Remco Smits
2024-10-23 11:44:24 +02:00
parent a95b16aa67
commit e2d449a11f
4 changed files with 6 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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),
_ => {}
},
),

View File

@@ -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())

View File

@@ -128,7 +128,7 @@ impl VariableList {
cx: &mut ViewContext<Self>,
) {
match event {
StackFrameListEvent::ChangedStackFrame => {
StackFrameListEvent::SelectedStackFrameChanged => {
self.build_entries(true, false, cx);
}
StackFrameListEvent::StackFramesUpdated => {