def show_state(self, state): '''Show the state onscreen.''' if not self.simpack_crutches: self.simpack.show_state(self, state) else: string = dict_tools.fancy_string(state.__dict__) self.text_state_shower.SetValue(string)
def _recalculate(self): '''Recalculate the widget.''' if self.needs_recalculation_flag: if self.gui_project: active_state = self.gui_project.get_active_state() if active_state: if active_state is not self.state: self.state = active_state state_repr = dict_tools.fancy_string(vars(active_state)) self.text_ctrl.SetValue(state_repr) self.needs_recalculation_flag = False
def _recalculate(self): '''Recalculate the widget.''' if self.needs_recalculation_flag: if self.gui_project: active_state = self.gui_project.get_active_state() if active_state: if active_state is not self.state: self.state = active_state state_repr = dict_tools.fancy_string( vars(active_state)) self.text_ctrl.SetValue(state_repr) self.needs_recalculation_flag = False