Skip to content

Commit

Permalink
DeletePreset Bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiwKerman committed Apr 15, 2016
1 parent 4db9be5 commit cbb59f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ public void TogglePresetEditWindow (IServo servo, bool value, GameObject buttonR
copyPresetsButton.onClick.AddListener(() => CopyPresetsToSiblings(servo));

var copyPresetsButtonTooltip = copyPresetsButton.gameObject.AddComponent<BasicTooltip>();
copyPresetsButtonTooltip.tooltipText = "Copy to siblings";
copyPresetsButtonTooltip.tooltipText = "Copy to symmetry siblings";

var presetsArea = _presetsWindow.GetChild("WindowContent");

Expand All @@ -697,7 +697,7 @@ public void TogglePresetEditWindow (IServo servo, bool value, GameObject buttonR
var presetPositionInputField = newPresetLine.GetChild("PresetPositionInputField").GetComponent<InputField>();
presetPositionInputField.text = string.Format("{0:#0.##}", servo.Preset[i]);
var presetIndex = i;
presetPositionInputField.onEndEdit.AddListener(tmp => { PresetInputOnEndEdit(tmp, presetIndex); });
presetPositionInputField.onEndEdit.AddListener(tmp => PresetInputOnEndEdit(tmp, presetIndex));

var servoDefaultPositionToggle = newPresetLine.GetChild("PresetDefaultPositionToggle").GetComponent<Toggle>();
servoDefaultPositionToggle.group = presetsArea.GetComponent<ToggleGroup>();
Expand Down Expand Up @@ -726,6 +726,7 @@ public void TogglePresetEditWindow (IServo servo, bool value, GameObject buttonR
presetWindowServo.Mechanism.DefaultPosition = 0;
presetWindowServo.Preset.RemoveAt(presetIndex);
Destroy(newPresetLine);
TogglePresetEditWindow(presetWindowServo, true, buttonRef);
});

var presetDeleteButtonTooltip = presetDeleteButton.gameObject.AddComponent<BasicTooltip>();
Expand Down

0 comments on commit cbb59f0

Please sign in to comment.