Changeset 1581:877a0e7feba9 in orange-bioinformatics for widgets/OWQualityControl.py


Ignore:
Timestamp:
02/23/12 18:27:03 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Fixed scene alignment (align left to prevent scene jittering when resizing). Fixed an RuntimeError due to a deleted QGraphicsWidget whose reference was still held from Python. Fixed an error when changing the distance measure with no input to the widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widgets/OWQualityControl.py

    r1573 r1581  
    160160        self.scene_view = QualityGraphicsView(self.scene) 
    161161        self.scene_view.setRenderHints(QPainter.Antialiasing) 
     162        self.scene_view.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) 
    162163        self.mainArea.layout().addWidget(self.scene_view) 
    163164         
     
    184185            self.split_by_model[:] = [] 
    185186            self.sort_by_model[:] = [] 
    186  
     187         
     188        self.main_widget = None 
    187189        self.scene.clear() 
    188190        self.info_box.setText("\n") 
     
    345347        """Distance measure has changed 
    346348        """ 
    347         with widget_disable(self): 
    348             self.update_distances() 
    349             self.replot_experiments() 
     349        if self.data is not None: 
     350            with widget_disable(self): 
     351                self.update_distances() 
     352                self.replot_experiments() 
    350353         
    351354    def on_view_resize(self, size): 
     
    354357        if self.main_widget: 
    355358            current = self.main_widget.size() 
    356             self.main_widget.resize(size.width() - 2,  
     359            self.main_widget.resize(size.width() - 6,  
    357360                                    current.height()) 
    358361             
     
    414417                                 key=lambda t: map(float_if_posible, t[0])) 
    415418         
    416 #        pprint(self.groups) 
    417 #        pprint(self.unique_pos) 
    418419         
    419420        if self.groups: 
     
    541542                            rug_item.setToolTip(tooltip) 
    542543                            rug_item.group_index = indices.index(i) 
     544                            rug_item.setZValue(rug_item.zValue() + 1) 
    543545                        else: 
    544546                            rug_item = ClickableRugItem(dist_vec[i] / max_dist, 
Note: See TracChangeset for help on using the changeset viewer.