diff --git a/advotracker/src/widgets/global_state.rs b/advotracker/src/widgets/global_state.rs index cb27152..2f8eba3 100644 --- a/advotracker/src/widgets/global_state.rs +++ b/advotracker/src/widgets/global_state.rs @@ -61,14 +61,14 @@ pub trait GlobalState { Some(text) } - /// Navigates to the given entity. - fn navigate(&self, to: Entity, ctx: &mut Context<'_>) { - if let Some(old_focused_element) = *Window::focus_state_ref(&ctx.window()).focused_entity() { - ctx.push_event_by_window(FocusEvent::RemoveFocus(old_focused_element)); - } - ctx.widget().set("visibility", Visibility::Collapsed); - ctx.get_widget(to).set("visibility", Visibility::Visible); - } + // /// Navigates to the given entity. + // fn navigate(&self, to: Entity, ctx: &mut Context<'_>) { + // if let Some(old_focused_element) = *Window::focus_state_ref(&ctx.window()).focused_entity() { + // ctx.push_event_by_window(FocusEvent::RemoveFocus(old_focused_element)); + // } + // ctx.widget().set("visibility", Visibility::Collapsed); + // ctx.get_widget(to).set("visibility", Visibility::Visible); + // } /// Save the our data structure and convert it to `ron` file format. /// The cargo package identifier (here: 'nwx.advotracker') is taken to create the app directory. diff --git a/advotracker/src/widgets/policycheck/policycheck_state.rs b/advotracker/src/widgets/policycheck/policycheck_state.rs index eaaf861..793eefa 100644 --- a/advotracker/src/widgets/policycheck/policycheck_state.rs +++ b/advotracker/src/widgets/policycheck/policycheck_state.rs @@ -181,7 +181,7 @@ impl PolicycheckState { /// Create new ticket pub fn new_ticket(&mut self, ctx: &mut Context<'_>) { println!("WIP: new ticket."); - self.navigate(self.ticketdata, ctx); + self(ticketdata_view.0); //ctx.widget().get_mut::(0). //ctx.get_widget(self.ticketdata_view); }