Browse Source

Fixed Renamebug

Felix Baeder 12 years ago
parent
commit
2b93f0b50f
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      CubeControl/Frame.java

+ 6
- 2
CubeControl/Frame.java View File

432
 					errorMessage("Select a Frame!");
432
 					errorMessage("Select a Frame!");
433
 					return;
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
 				frameListModel.set(f, worker.getAnimation(a).getFrame(f).getName());
438
 				frameListModel.set(f, worker.getAnimation(a).getFrame(f).getName());
437
 				frameList.setModel(frameListModel);
439
 				frameList.setModel(frameListModel);
438
 			}
440
 			}
483
 					errorMessage("Select an animation!");
485
 					errorMessage("Select an animation!");
484
 					return;
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
 				animListModel.set(a, worker.getAnimation(a).getName());
491
 				animListModel.set(a, worker.getAnimation(a).getName());
488
 				animList.setModel(animListModel);
492
 				animList.setModel(animListModel);
489
 			}
493
 			}

Loading…
Cancel
Save