Skip to content

Commit

Permalink
Fix for #98 to show all messages when changing multi-message count.
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilfb committed Aug 18, 2016
1 parent 3c8e07c commit c03c411
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public void changed(final ObservableValue<? extends Number> observable, Number o
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue)
{
int newNumber = newValue.intValue();
// messagesDisplayed = newValue.intValue();

messageCountSlider.setValue(newNumber);

updateMessagesDisplayed(newNumber);
Expand Down Expand Up @@ -506,6 +506,9 @@ private void updateMessagesDisplayed(int newValue)
messagesDisplayed++;
}
}

// Refresh all messages to populate all panes
eventBus.publish(new MessageIndexChangeEvent((int) messageIndexScrollBar.getValue(), store, this));
}

private void updateLayout(final MessageBrowserLayout layout)
Expand Down Expand Up @@ -593,6 +596,7 @@ private void resetScrollBar()
messageIndexScrollBar.setMin(1);
messageIndexScrollBar.setValue(1);
messageIndexScrollBar.setMax(1);

// TODO: this will need to be adjusted once multiple messages are displayed
messageIndexScrollBar.setVisibleAmount(1);
messageIndexScrollBar.setDisable(true);
Expand Down

0 comments on commit c03c411

Please sign in to comment.