Felix Baeder před 12 roky
rodič
revize
2b93f0b50f
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6
    2
      CubeControl/Frame.java

+ 6
- 2
CubeControl/Frame.java Zobrazit soubor

@@ -432,7 +432,9 @@ public class Frame extends JFrame implements ListSelectionListener, ChangeListen
432 432
 					errorMessage("Select a Frame!");
433 433
 					return;
434 434
 				}
435
-				worker.getAnimation(a).getFrame(f).setName(askString("Rename", "Rename " + frameList.getSelectedValue() + "?"));
435
+				String newName = askString("Rename", "Rename " + frameList.getSelectedValue() + "?");
436
+				if (!newName.equals("")){
437
+					worker.getAnimation(a).getFrame(f).setName(newName);}
436 438
 				frameListModel.set(f, worker.getAnimation(a).getFrame(f).getName());
437 439
 				frameList.setModel(frameListModel);
438 440
 			}
@@ -483,7 +485,9 @@ public class Frame extends JFrame implements ListSelectionListener, ChangeListen
483 485
 					errorMessage("Select an animation!");
484 486
 					return;
485 487
 				}
486
-				worker.getAnimation(a).setName(askString("Rename", "Rename " + animList.getSelectedValue() + "?"));
488
+				String newName = askString("Rename", "Rename " + animList.getSelectedValue() + "?");
489
+				if (!newName.equals("")){
490
+					worker.getAnimation(a).setName(newName);}
487 491
 				animListModel.set(a, worker.getAnimation(a).getName());
488 492
 				animList.setModel(animListModel);
489 493
 			}

Loading…
Zrušit
Uložit