dock: Add mutable reference for set_active (#655)
This commit is contained in:
parent
3b4065ce4e
commit
9739493bce
2 changed files with 2 additions and 3 deletions
|
|
@ -472,7 +472,7 @@ impl Panel for StoryContainer {
|
|||
println!("panel: {} zoomed: {}", self.name, zoomed);
|
||||
}
|
||||
|
||||
fn set_active(&self, active: bool, _window: &Window, _cx: &App) {
|
||||
fn set_active(&mut self, active: bool, _window: &Window, _cx: &App) {
|
||||
println!("panel: {} active: {}", self.name, active);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ pub trait Panel: EventEmitter<PanelEvent> + Render + Focusable {
|
|||
/// This method will be called when the panel is active or inactive.
|
||||
///
|
||||
/// The last_active_panel and current_active_panel will be touched when the panel is active.
|
||||
#[allow(unused_variables)]
|
||||
fn set_active(&self, active: bool, window: &Window, cx: &App) {}
|
||||
fn set_active(&mut self, active: bool, window: &Window, cx: &App) {}
|
||||
|
||||
/// Set zoomed state of the panel.
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue