Mercurial > MadButterfly
comparison pyink/comp_dock.py @ 1514:fa4d0480d6cb
Switch the component that FSM editor is working on
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 11 May 2011 00:05:59 +0800 |
parents | c3e0af5d2487 |
children | 04b67119df8c |
comparison
equal
deleted
inserted
replaced
1513:5d4c7ec05bcd | 1514:fa4d0480d6cb |
---|---|
354 self._FSM_view_widget = view_widget | 354 self._FSM_view_widget = view_widget |
355 | 355 |
356 fsm_win.set_svg_view(view_widget) | 356 fsm_win.set_svg_view(view_widget) |
357 pass | 357 pass |
358 | 358 |
359 def _show_FSM_editor(self): | 359 def _show_FSM_for_comp(self, comp_name): |
360 if not self._fsm_editor_win: | 360 if not self._fsm_editor_win: |
361 self._prepare_FSM_editor() | 361 self._prepare_FSM_editor() |
362 fsm_win = self._fsm_editor_win | 362 fsm_win = self._fsm_editor_win |
363 else: | 363 else: |
364 fsm_win = self._fsm_editor_win | 364 fsm_win = self._fsm_editor_win |
365 pass | 365 pass |
366 fsm_win.switch_component(comp_name) | |
366 fsm_win.show() | 367 fsm_win.show() |
367 pass | 368 pass |
368 | 369 |
369 def _show_FSM_for_comp(self, comp_name): | |
370 pass | |
371 | |
372 def on_add_comp_clicked(self, *args): | 370 def on_add_comp_clicked(self, *args): |
373 self._add_component() | 371 self._add_component() |
374 self._drop_undo() | 372 self._drop_undo() |
375 pass | 373 pass |
376 | 374 |
440 pass | 438 pass |
441 | 439 |
442 ## \brief User clicks "State Machine" on context menu for a component. | 440 ## \brief User clicks "State Machine" on context menu for a component. |
443 # | 441 # |
444 def on_edit_FSM_activate(self, *args): | 442 def on_edit_FSM_activate(self, *args): |
445 self._show_FSM_editor() | |
446 comp_name = self._current_component() | 443 comp_name = self._current_component() |
447 self._show_FSM_for_comp(comp_name) | 444 self._show_FSM_for_comp(comp_name) |
448 pass | 445 pass |
449 | 446 |
450 def on_add_timeline_clicked(self, *args): | 447 def on_add_timeline_clicked(self, *args): |