Skip to content

Conversation

@alixdamman
Copy link
Contributor

No description provided.

…) and resizeAxesRowToContents() methods + synchronized view_axes with view_x/ylabels in ArrayEditorWidget
# no need to call resizeSection on view_ylabels (see synchronization lines in init)
self.view_axes.horizontalHeader().resizeSection(column, width)

def resizeDataColumnToContents(self, column):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to resize_xlabels_column_to_contents because this works first on the view_xlabels not view_data?

  • to be consistent with resizeAxes... which works on view_axes
  • to respect python naming conventions (this is not an overridden method name)

self.view_xlabels.horizontalHeader().resizeSection(column, width)

def resizeRowToContents(self, row):
def resizeAxesRowToContents(self, row):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to resize_axes_row_to_contents?

# no need to call resizeSection on view_xlabels (see synchronization lines in init)
self.view_axes.verticalHeader().resizeSection(row, height)

def resizeDataRowToContents(self, row):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

self.resizeDataColumnToContents(column)

def resizeColumnToContents(self, column):
def resizeAxesColumnToContents(self, column):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to resize_axes_column_to_contents?


# test autoresizing
arr8 = la.zeros('a=a_long_label,another_long_label')
arr8 = la.zeros('a=a_long_label,another_long_label; b=this_is_a_label,this_is_another_one')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice to give meaningful names to those arrays: either what do they test, or what is their "special" characteristic, eg:

>>> test_column_resize1 = la.zeros('a=a_long_label,another_long_label; b=this_is_a_label,this_is_another_one')
>>> # or
>>> long_labels = la.zeros('a=a_long_label,another_long_label; b=this_is_a_label,this_is_another_one')

Copy link
Collaborator

@gdementen gdementen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs changelog

@alixdamman alixdamman merged commit e94a5ed into larray-project:master Sep 27, 2017
@alixdamman alixdamman deleted the autoresize_43 branch September 27, 2017 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants