Be more reasonable in GuiKeyframeRepository with user inputs, not replacing the keyframeSetList's elements every time the Keyframe Preset's name changes and therefore not calling the Listener which set the nameInput's value every time. This leads to a smoother user experience regarding the nameInput Text Field.
This commit is contained in:
@@ -226,10 +226,11 @@ public class GuiKeyframeRepository extends GuiScreen implements GuiReplayOverlay
|
||||
saveOnQuit();
|
||||
super.keyTyped(typedChar, keyCode);
|
||||
}
|
||||
if(currentKeyframeSet != null) {
|
||||
currentKeyframeSet.setName(nameInput.getText());
|
||||
keyframeSetList.replaceElement(keyframeSetList.getSelectionIndex(), currentKeyframeSet);
|
||||
if(currentKeyframeSet != null && !currentKeyframeSet.getName().equals(nameInput.getText().trim())) {
|
||||
currentKeyframeSet.setName(nameInput.getText().trim());
|
||||
}
|
||||
|
||||
super.keyTyped(typedChar, keyCode);
|
||||
}
|
||||
|
||||
private void saveOnQuit() {
|
||||
|
||||
Reference in New Issue
Block a user