Merge pull request #150 from Tointer/fix_multiselecting_bug
fix: Multiselecting sets all scales to the same valuepull/169/head
commit
d775e805fb
|
@ -250,20 +250,27 @@ namespace Coffee.UIExtensions
|
|||
EditorGUILayout.BeginHorizontal();
|
||||
if (showXyz)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(sp);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
x.floatValue = Mathf.Max(0.001f, x.floatValue);
|
||||
y.floatValue = Mathf.Max(0.001f, y.floatValue);
|
||||
z.floatValue = Mathf.Max(0.001f, z.floatValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(x, s_ContentScale);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
z.floatValue = y.floatValue = x.floatValue;
|
||||
{
|
||||
x.floatValue = Mathf.Max(0.001f, x.floatValue);
|
||||
y.floatValue = Mathf.Max(0.001f, x.floatValue);
|
||||
z.floatValue = Mathf.Max(0.001f, x.floatValue);
|
||||
}
|
||||
}
|
||||
|
||||
x.floatValue = Mathf.Max(0.001f, x.floatValue);
|
||||
y.floatValue = Mathf.Max(0.001f, y.floatValue);
|
||||
z.floatValue = Mathf.Max(0.001f, z.floatValue);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
showXyz = GUILayout.Toggle(showXyz, s_Content3D, EditorStyles.miniButton, GUILayout.Width(30));
|
||||
if (EditorGUI.EndChangeCheck() && !showXyz)
|
||||
|
|
Loading…
Reference in New Issue