Commit 224afa3 Jesse
committed
1 parent ffbb437 commit 224afa3 Copy full SHA for 224afa3
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
- /*!
1
+ /*!
2
2
* Android Assets for Photoshop
3
3
* =============================
4
4
*
@@ -23,6 +23,13 @@ init();
23
23
24
24
// The other functions
25
25
function init ( ) {
26
+
27
+ // save current ruler unit settings, so we can restore it
28
+ var ru = app . preferences . rulerUnits ;
29
+
30
+ // set ruler units to pixel to ensure scaling works as expected
31
+ app . preferences . rulerUnits = Units . PIXELS ;
32
+
26
33
if ( ! isDocumentNew ( ) ) {
27
34
saveFunc ( 'xxhdpi' ) ;
28
35
saveFunc ( 'xhdpi' ) ;
@@ -33,6 +40,8 @@ function init() {
33
40
alert ( "Please save your document before running this script." ) ;
34
41
}
35
42
43
+ // restore old ruler unit settings
44
+ app . preferences . rulerUnits = ru ;
36
45
}
37
46
38
47
// Test if the document is new (unsaved)
You can’t perform that action at this time.
0 commit comments