Minor code cleanup #930
This commit is contained in:
@@ -78,7 +78,6 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <seealso cref="FlaxEditor.CustomEditors.Editors.Float3Editor" />
|
||||
public class ScaleEditor : Float3Editor
|
||||
{
|
||||
|
||||
private Image _linkImage;
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -103,7 +102,10 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
LinkedLabel.SetupContextMenu += (label, menu, editor) =>
|
||||
{
|
||||
menu.AddSeparator();
|
||||
menu.AddButton(LinkValues ? "Unlink" : "Link", ToggleLink);
|
||||
if (LinkValues)
|
||||
menu.AddButton("Unlink", ToggleLink).LinkTooltip("Unlinks scale components from uniform scaling");
|
||||
else
|
||||
menu.AddButton("Link", ToggleLink).LinkTooltip("Links scale components for uniform scaling");
|
||||
};
|
||||
|
||||
// Override colors
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
return;
|
||||
if (LinkValues)
|
||||
_valueChanged = ValueChanged.X;
|
||||
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
@@ -107,7 +106,6 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
return;
|
||||
if (LinkValues)
|
||||
_valueChanged = ValueChanged.Y;
|
||||
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
@@ -117,7 +115,6 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
return;
|
||||
if (LinkValues)
|
||||
_valueChanged = ValueChanged.Z;
|
||||
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
@@ -150,8 +147,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
xValue += valueChange;
|
||||
yValue += valueChange;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user