فهرست منبع

curve editor: fix keys now working correctly on select box drag

lviguier 1 سال پیش
والد
کامیت
2dccee6ed5
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      hide/comp/CurveEditor.hx

+ 7 - 2
hide/comp/CurveEditor.hx

@@ -779,6 +779,11 @@ class CurveEditor extends hide.comp.Component {
 		afterChange();
 	}
 
+	function fixKeys(keys : Array<CurveKey>) {
+		for (k in keys)
+			fixKey(k);
+	}
+
 	function fixKey(key : CurveKey) {
 		for (c in curves) {
 			if (!c.selected)
@@ -1583,10 +1588,10 @@ class CurveEditor extends hide.comp.Component {
 							key.value -= dy / yScale;
 							if(e.altKey)
 								key.value += deltaY / yScale;
-
-							fixKey(key);
 						}
 
+						fixKeys(cast selectedEvents);
+
 						for(el in selectedEvents) {
 							el.event.time += dx / xScale;
 							if(lockKeyX || e.shiftKey)