Skip to content

Commit

Permalink
GUI View Labels: Don't plot the dendrogram until the panes are in pos…
Browse files Browse the repository at this point in the history
…ition

Otherwise we rebuild it three times, and
this takes a while for large trees.

Updates #753
  • Loading branch information
shawnlaffan committed Feb 5, 2020
1 parent bc0bfee commit 332003a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/Biodiverse/GUI/Tabs/Labels.pm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ sub new {
$self->init_list('listLabels1');
$self->init_list('listLabels2');

# "open up" the panes
# need to do this before displaying the dendrogram
# as a resize triggers a complete redraw
# (something to be fixed sometime)
$self->queue_set_pane(0.5, 'hpaneLabelsTop');
$self->queue_set_pane(0.5, 'hpaneLabelsBottom');
$self->queue_set_pane(0.5, 'vpaneLabels');
# vpaneLists is done after hpaneLabelsTop, since this panel isn't able to get
# its max size before hpaneLabelsTop is resized

if (! $self->init_grid()) { # close if user cancelled during display
$self->on_close;
croak "User cancelled grid initialisation, closing\n";
Expand Down Expand Up @@ -135,12 +145,6 @@ sub new {
);
$self->on_selected_phylogeny_changed();

# "open up" the panes
$self->queue_set_pane(0.5, 'hpaneLabelsTop');
$self->queue_set_pane(0.5, 'hpaneLabelsBottom');
$self->queue_set_pane(0.5, 'vpaneLabels');
# vpaneLists is done after hpaneLabelsTop, since this panel isn't able to get
# its max size before hpaneLabelsTop is resized

# Panes will modify this to keep track of which one the mouse is currently
# over
Expand Down

0 comments on commit 332003a

Please sign in to comment.