Browse Source

SceneEditor: select parent on backspace

trethaller 7 years ago
parent
commit
ae66a67ee9
2 changed files with 5 additions and 0 deletions
  1. 1 0
      bin/defaultProps.json
  2. 4 0
      hide/comp/SceneEditor.hx

+ 1 - 0
bin/defaultProps.json

@@ -37,6 +37,7 @@
 	"key.sceneeditor.hide": "H",
 	"key.sceneeditor.hide": "H",
 	"key.sceneeditor.showAll": "Ctrl-H",
 	"key.sceneeditor.showAll": "Ctrl-H",
 	"key.sceneeditor.isolate": "I",
 	"key.sceneeditor.isolate": "I",
+	"key.sceneeditor.selectParent": "Backspace",
 
 
 	// cdb config
 	// cdb config
 
 

+ 4 - 0
hide/comp/SceneEditor.hx

@@ -128,6 +128,10 @@ class SceneEditor {
 		view.keys.register("sceneeditor.hide", function() {	setVisible(curEdit.elements, false); });
 		view.keys.register("sceneeditor.hide", function() {	setVisible(curEdit.elements, false); });
 		view.keys.register("sceneeditor.isolate", function() {	isolate(curEdit.elements); });
 		view.keys.register("sceneeditor.isolate", function() {	isolate(curEdit.elements); });
 		view.keys.register("sceneeditor.showAll", function() {	setVisible(context.shared.elements(), true); });
 		view.keys.register("sceneeditor.showAll", function() {	setVisible(context.shared.elements(), true); });
+		view.keys.register("sceneeditor.selectParent", function() {
+			if(curEdit.rootElements.length > 0)
+				selectObjects([curEdit.rootElements[0].parent]);
+		});
 	}
 	}
 
 
 	public function getSelection() {
 	public function getSelection() {