Browse Source

SceneEditor: Fix double click on eye icons focusing on object

trethaller 6 years ago
parent
commit
58d248dad3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      hide/comp/SceneEditor.hx

+ 4 - 1
hide/comp/SceneEditor.hx

@@ -795,7 +795,6 @@ class SceneEditor {
 			if(tog.length == 0) {
 				tog = new Element('<i class="fa fa-eye visibility-toggle"/>').insertAfter(el.find("a.jstree-anchor").first());
 				tog.click(function(e) {
-					e.stopPropagation();
 					if(curEdit.elements.indexOf(obj3d) >= 0)
 						setVisible(curEdit.elements, isHidden(obj3d));
 					else
@@ -804,6 +803,10 @@ class SceneEditor {
 					e.preventDefault();
 					e.stopPropagation();
 				});
+				tog.dblclick(function(e) {
+					e.preventDefault();
+					e.stopPropagation();
+				});
 			}
 		}
 	}