diff --git a/mqtt-spy/src/main/java/pl/baczkowicz/mqttspy/ui/controllers/SubscriptionController.java b/mqtt-spy/src/main/java/pl/baczkowicz/mqttspy/ui/controllers/SubscriptionController.java index 7fba562b..1d743a86 100644 --- a/mqtt-spy/src/main/java/pl/baczkowicz/mqttspy/ui/controllers/SubscriptionController.java +++ b/mqtt-spy/src/main/java/pl/baczkowicz/mqttspy/ui/controllers/SubscriptionController.java @@ -307,7 +307,7 @@ public void changed(final ObservableValue observable, Number o public void changed(ObservableValue observable, Number oldValue, Number newValue) { int newNumber = newValue.intValue(); - // messagesDisplayed = newValue.intValue(); + messageCountSlider.setValue(newNumber); updateMessagesDisplayed(newNumber); @@ -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) @@ -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);