*/}}
Browse Source

color picker push histories

YimingWu 1 year ago
parent
commit
4a049470f1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      resources/la_widgets.c

+ 5 - 1
resources/la_widgets.c

@@ -2228,7 +2228,11 @@ int OPMOD_ColorHCY(laOperator *a, laEvent *e){
     real dist = sqrt(dx * dx + dy * dy);
 
     if (e->Type == LA_L_MOUSE_DOWN){ ui->State = LA_UI_ACTIVE; laRedrawCurrentPanel(); es->Dragging=(dist<=r)?1:2; }
-    if (e->Type == LA_L_MOUSE_UP){ ui->State = LA_UI_NORMAL; es->Dragging=0; laRedrawCurrentPanel(); return LA_RUNNING_PASS; }
+    if (e->Type == LA_L_MOUSE_UP){
+        ui->State = LA_UI_NORMAL; es->Dragging=0; laRedrawCurrentPanel();
+        laRecordAndPushProp(&ui->PP,0); laMarkPropChanged(&ui->PP);
+        return LA_RUNNING_PASS;
+    }
 
     if (e->Type & LA_MOUSE_EVENT && es->Dragging){
         laGetFloatArray(&ui->PP, Color);