Browse Source

Editor: Save scene when enabling autosave.

Mr.doob 10 years ago
parent
commit
2042a3e49e
1 changed files with 9 additions and 1 deletions
  1. 9 1
      editor/js/Menubar.Status.js

+ 9 - 1
editor/js/Menubar.Status.js

@@ -10,7 +10,15 @@ Menubar.Status = function ( editor ) {
 	var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) );
 	checkbox.onChange( function () {
 
-		editor.config.setKey( 'autosave', this.getValue() );
+		var value = this.getValue();
+
+		editor.config.setKey( 'autosave', value );
+
+		if ( value === true ) {
+
+			editor.signals.sceneGraphChanged.dispatch();
+
+		}
 
 	} );
 	container.add( checkbox );