diff options
Diffstat (limited to 'ka_controller.py')
-rw-r--r-- | ka_controller.py | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/ka_controller.py b/ka_controller.py index 66581b7..2dfe26d 100644 --- a/ka_controller.py +++ b/ka_controller.py @@ -140,18 +140,18 @@ class KandidController(object): pre: widget is not None """ # draw precalculated protozoon stored in the surface cache. - ka_debug.info('on_drawingarea_expose: ' + widget.name + ' ' - + str(widget.allocation.width) - + 'x' + str(widget.allocation.height)) +# ka_debug.info('on_drawingarea_expose: ' + widget.name + ' ' +# + str(widget.allocation.width) +# + 'x' + str(widget.allocation.height)) self._draw_from_cache(widget, name_to_index(widget.name)) def on_drawingarea_size_allocate(self, widget, event): """ New size for drawing area available. pre: widget is not None """ - ka_debug.info('on_drawingarea_size_allocate: ' + widget.name + ' ' - + str(widget.allocation.width) - + 'x' + str(widget.allocation.height)) +# ka_debug.info('on_drawingarea_size_allocate: ' + widget.name + ' ' +# + str(widget.allocation.width) +# + 'x' + str(widget.allocation.height)) self.start_calculation([name_to_index(widget.name)]) def on_fitness_value_changed(self, *args): @@ -186,12 +186,12 @@ class KandidController(object): """ pre: len(args) == 1 """ - ka_debug.info('on_model_completed entry') +# ka_debug.info('on_model_completed entry') for cell_index in args[0]: self._widget_tree.get_widget('vbox_' + str(cell_index)). \ set_sensitive(False) self.start_calculation(args[0]) - ka_debug.info('on_model_completed exit') +# ka_debug.info('on_model_completed exit') def on_timer(self, *args): if self._start_from_scratch: @@ -199,7 +199,7 @@ class KandidController(object): def start_all_calculations(self): self._start_from_scratch = False - ka_debug.info('start_all_calculations %u' % (self.model.size)) +# ka_debug.info('start_all_calculations %u' % (self.model.size)) ka_debug.print_call_stack() self.start_calculation([i for i in range(self.model.size)]) @@ -215,8 +215,8 @@ class KandidController(object): self.on_image_completed) task.start(self.model.protozoans[cell_index], cell_index, widget.allocation.width, widget.allocation.height) - ka_debug.info('start_calculation %ux%u for %s' % - (widget.allocation.width, widget.allocation.height, widget.name)) +# ka_debug.info('start_calculation %ux%u for %s' % +# (widget.allocation.width, widget.allocation.height, widget.name)) def task_breed_generation(self, *args, **kwargs): """ @@ -225,7 +225,6 @@ class KandidController(object): # ka_debug.info('task_breed_generation entry') new_indices = self.model.breed_generation() # ka_debug.info('task_breed_generation exit') -#!! ka_task.GeneratorTask.leave() return new_indices def task_breed_single(self, *args, **kwargs): @@ -235,7 +234,6 @@ class KandidController(object): # ka_debug.info('task_breed_single entry') new_indices = self.model.breed_single(args[0]) # ka_debug.info('task_breed_single exit') -#!! ka_task.GeneratorTask.leave() return new_indices def task_random_generation(self, *args, **kwargs): @@ -245,7 +243,6 @@ class KandidController(object): # ka_debug.info('task_random_generation entry') new_indices = self.model.random() # ka_debug.info('task_random_generation exit') -#!! ka_task.GeneratorTask.leave() return new_indices def task_render(self, *args, **kwargs): @@ -260,7 +257,6 @@ class KandidController(object): protozoon.render(ctx, width, height) self.surface_cache[cell_index] = surface # ka_debug.info('task_render exit: ' + str(cell_index)) -#!! ka_task.GeneratorTask.leave() return cell_index def on_image_completed(self, *args): @@ -396,7 +392,7 @@ class KandidController(object): popup_menu.popup(None, None, None, event.button, event.time) def on_zoom_incoming(self, menu_item): - ka_debug.info('on_zoom_incoming [%s]' % menu_item.parent.name) +# ka_debug.info('on_zoom_incoming [%s]' % menu_item.parent.name) if self.zoom_controller is not None: index = name_to_index(menu_item.parent.name) protozoon, dummy = self.incoming.at_index(index) |