浏览代码

fix drag event won't allow save

Nicolas Cannasse 4 年之前
父节点
当前提交
32e33e634b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      hide/view/Model.hx

+ 3 - 0
hide/view/Model.hx

@@ -657,12 +657,15 @@ class Model extends FileView {
 					var curPos = (curFrame / obj.currentAnimation.frameCount) * W;
 					dragInter.onPush = function(e) {
 						if( hxd.Key.isDown( hxd.Key.MOUSE_LEFT) ){
+							var startFrame = curFrame;
 							dragInter.startDrag(function(e) {
 								switch( e.kind ) {
 								case ERelease:
 									dragInter.stopDrag();
 									buildTimeline();
 									buildEventPanel();
+									if( curFrame != startFrame )
+										modified = true;
 								case EMove:
 									var newFrame = Math.round(( (curPos + (e.relX - 2.5) * dragIcon.scaleX ) / W ) * obj.currentAnimation.frameCount);
 									if( newFrame >= 0 && newFrame <= obj.currentAnimation.frameCount ) {