Skip to content

Commit b93bd7a

Browse files
committed
Reselect when Outline changed.
1 parent 1eb3915 commit b93bd7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/SpriteAssist/Editor/Util/OutlineUtil.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ public static void Translate(TextureImporter textureImporter, TranslateDirection
9696
SetOutlines(outlineSP, outlines);
9797
serializedObject.ApplyModifiedProperties();
9898

99+
var selection = Selection.activeObject;
99100
AssetDatabase.ImportAsset(textureImporter.assetPath, ImportAssetOptions.DontDownloadFromCacheServer);
101+
Selection.activeObject = selection;
100102
}
101103

102104
public static void Resize(TextureImporter textureImporter, int originalWidth, int originalHeight, int newWidth, int newHeight, ResizeUtil.ResizeMethod resizeMethod)
@@ -143,7 +145,9 @@ public static void Resize(TextureImporter textureImporter, int originalWidth, in
143145
SetOutlines(outlineSP, outlines);
144146
serializedObject.ApplyModifiedProperties();
145147

148+
var selection = Selection.activeObject;
146149
AssetDatabase.ImportAsset(textureImporter.assetPath, ImportAssetOptions.DontDownloadFromCacheServer);
150+
Selection.activeObject = selection;
147151
}
148152

149153
private static Vector2[][] GenerateGridOutline(Sprite sprite, int gridSize, float tolerance, bool dataDetectHoles)

0 commit comments

Comments
 (0)