Changeset 8252:fc502493965c in orange


Ignore:
Timestamp:
08/22/11 12:56:36 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
c27641d2087ec54b140333df041d50a23e1622aa
Message:

Disable animations while performing a FreeViz optimization.

Location:
orange/OrangeWidgets
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWFreeVizOptimization.py

    r6538 r8252  
    256256        self.cancelOptimization = 0 
    257257        #qApp.processEvents() 
     258         
     259        if hasattr(self.graph, 'animate_points'): 
     260            self.graph_is_animated = self.graph.animate_points 
     261            self.graph.animate_points = False 
    258262 
    259263        ns = FreeViz.optimizeSeparation(self, self.stepsBeforeUpdate, singleStep, self.parentWidget.distances) 
     
    267271    def stopOptimization(self): 
    268272        self.cancelOptimization = 1 
     273        if hasattr(self, 'graph_is_animated'): 
     274            self.graph.animate_points = self.graph_is_animated 
    269275 
    270276#    # ############################################################# 
     
    422428    ow.show() 
    423429    a.exec_() 
     430 
  • orange/OrangeWidgets/plot/owplot.py

    r8241 r8252  
    15761576    def update_animations(self, use_animations=None): 
    15771577        if use_animations is not None: 
    1578             self.use_animations = use_animations 
     1578            self.animate_plot = use_animations 
     1579            self.animate_points = use_animations 
    15791580             
    15801581    def update_performance(self, num_points = None): 
     
    15861587                    num_points = sum( len(c.points()) for c in self.curves ) 
    15871588            if num_points > self.disable_animations_threshold: 
    1588                 qDebug('Disabling animations') 
     1589                self.disabled_animate_points = self.animate_points 
    15891590                self.animate_points = False 
     1591                 
     1592                self.disabled_animate_plot = self.animate_plot 
    15901593                self.animate_plot = False 
     1594                 
     1595                self.disabled_antialias_lines = self.animate_points 
    15911596                self.antialias_lines = False 
    1592             else: 
    1593                 qDebug('Enabling animations') 
    1594                 self.animate_points = True 
    1595                 self.animate_plot = True 
    1596                 self.antialias_lines = True 
     1597             
     1598            elif hasattr(self, 'disabled_animate_points'): 
     1599                self.animate_points = self.disabled_animate_points 
     1600                del self.disabled_animate_points 
     1601                 
     1602                self.animate_plot = self.disabled_animate_plot 
     1603                del self.disabled_animate_plot 
     1604                 
     1605                self.antialias_lines = self.disabled_antialias_lines 
     1606                del self.disabled_antialias_lines 
    15971607         
    15981608    def animate(self, target, prop_name, end_val, duration = None, start_val = None): 
  • orange/OrangeWidgets/plot/owplotgui.py

    r8223 r8252  
    315315            and the callback ``cb_name`` is called.  
    316316        ''' 
    317         OWGUI.checkBox(widget, self._plot, value, label, callback=self._get_callback(cb_name))     
     317        OWGUI.checkBox(widget, self._plot, value, label, callback=self._get_callback(cb_name)) 
    318318         
    319319    def antialiasing_check_box(self, widget): 
Note: See TracChangeset for help on using the changeset viewer.