File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -815,14 +815,16 @@ def autofit_columns(self):
815
815
self .view_data .autofit_columns ()
816
816
817
817
def resizeColumnToContents (self , column ):
818
- self .view_data .resizeColumnToContents (column )
819
- width = self .view_data .columnWidth (column )
820
- self .view_xlabels .setColumnWidth (column , width )
818
+ width = max (self .view_xlabels .horizontalHeader ().sectionSizeHint (column ),
819
+ self .view_data .sizeHintForColumn (column ))
820
+ self .view_data .horizontalHeader ().resizeSection (column , width )
821
+ self .view_xlabels .horizontalHeader ().resizeSection (column , width )
821
822
822
823
def resizeRowToContents (self , row ):
823
- self .view_data .resizeRowToContents (row )
824
- height = self .view_data .rowHeight (row )
825
- self .view_ylabels .setRowHeight (row , height )
824
+ height = max (self .view_xlabels .verticalHeader ().sectionSizeHint (row ),
825
+ self .view_data .sizeHintForRow (row ))
826
+ self .view_data .verticalHeader ().resizeSection (row , height )
827
+ self .view_ylabels .verticalHeader ().resizeSection (row , height )
826
828
827
829
@property
828
830
def dirty (self ):
You can’t perform that action at this time.
0 commit comments