Merge pull request #1527 from SiboVG/issue-1520

[#1520] Add check for selection options size
This commit is contained in:
SiboVG 2022-07-18 16:35:09 +02:00 committed by GitHub
commit d211537a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,7 +346,7 @@ public class ScaleDialog extends JDialog {
panel.add(selectionOption, "growx, wrap para*2");
// Select the 'scale component / scale selection and all subcomponents' if a component is selected
if (selection != null && selection.size() > 0) {
if (options.size() > 1 && selection != null && selection.size() > 0) {
boolean entireRocket = false; // Flag to scale entire rocket
for (RocketComponent component : selection) {
if (component instanceof Rocket || (component instanceof AxialStage && !(component instanceof ParallelStage))) {