Invalidate MotorInformationPanel when updating (fixes #885)
Calls invalidate() as the last action inside MotorInformationPanel.updateData(), forcing a redraw of the panel. This makes sure the panel is large enough to display all of its contents Also, clean up display of the compatible cases a little bit by adding a space between cases, and wrapping in <html></html> tags to allow line breaks.
This commit is contained in:
parent
f71ae2bb40
commit
3e3b854ce9
@ -273,7 +273,7 @@ class MotorInformationPanel extends JPanel {
|
|||||||
selectedMotor.getBurnoutMass()));
|
selectedMotor.getBurnoutMass()));
|
||||||
caseInfoLabel.setText(selectedMotor.getCaseInfo());
|
caseInfoLabel.setText(selectedMotor.getCaseInfo());
|
||||||
propInfoLabel.setText(selectedMotor.getPropellantInfo());
|
propInfoLabel.setText(selectedMotor.getPropellantInfo());
|
||||||
compatibleCasesLabel.setText( StringUtils.join(",",selectedMotor.getCompatibleCases()));
|
compatibleCasesLabel.setText("<html>" + StringUtils.join(", ",selectedMotor.getCompatibleCases()) + "<html>");
|
||||||
dataPointsLabel.setText("" + (selectedMotor.getTimePoints().length - 1));
|
dataPointsLabel.setText("" + (selectedMotor.getTimePoints().length - 1));
|
||||||
|
|
||||||
if (digestLabel != null) {
|
if (digestLabel != null) {
|
||||||
@ -308,6 +308,7 @@ class MotorInformationPanel extends JPanel {
|
|||||||
|
|
||||||
plot.setDataset(dataset);
|
plot.setDataset(dataset);
|
||||||
|
|
||||||
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setComment(String s) {
|
private void setComment(String s) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user