Changeset 8727:162096647897 in orange


Ignore:
Timestamp:
08/17/11 23:07:14 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
31f9b2efa9bb4cc9822424a1b0b4e7858187ec4b
Message:

Added data == None check; added deleting OpenGL resources

Location:
orange/OrangeWidgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Visualize Qt/OWScatterPlot3D.py

    r8724 r8727  
    4848 
    4949    def set_data(self, data, subset_data=None, **args): 
     50        if data == None: 
     51            return 
    5052        orngScaleScatterPlotData.set_data(self, data, subset_data, **args) 
    5153        OWPlot3D.set_data(self, self.no_jittering_scaled_data, self.no_jittering_scaled_subset_data) 
     
    5456    def update_data(self, x_attr, y_attr, z_attr, 
    5557                    color_attr, symbol_attr, size_attr, label_attr): 
     58        if self.data == None: 
     59            return 
    5660        self.before_draw_callback = self.before_draw 
    5761 
  • orange/OrangeWidgets/plot/owplot3d.py

    r8726 r8727  
    404404 
    405405    def __del__(self): 
    406         # TODO: check if anything needs deleting 
    407         # TODO: yes it does! 
    408         pass 
     406        # TODO: never reached! 
     407        glDeleteVertexArrays(1, self.dummy_vao) 
     408        glDeleteVertexArrays(1, self.feedback_vao) 
     409        glDeleteBuffers(1, self.symbol_buffer) 
     410        if hasattr(self, 'data_buffer'): 
     411            glDeleteBuffers(1, self.data_buffer) 
    409412 
    410413    def initializeGL(self): 
Note: See TracChangeset for help on using the changeset viewer.