re-apply sams ladspa icons, drop gtk from ydiff, gradient reset btn
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mwindowmove.C
index 47bc2f1a201e853cc3f3eba68b5d8254fe2e3758..0cd6e455d6778dc11389dcd7206f8776cbe90194 100644 (file)
@@ -178,10 +178,17 @@ void MWindow::fit_autos(int doall)
                switch (i)
                {
                case AUTOGROUPTYPE_AUDIO_FADE:
+                       if (range < 1) {
+                               min = MIN(min, edl->local_session->automation_mins[i]);
+                               max = MAX(max, edl->local_session->automation_maxs[i]);
+                               if( min >= max-0.1 ) { min = -80.0; min = 6.0; }
+                       }
+                       break;
                case AUTOGROUPTYPE_VIDEO_FADE:
-                       if (range < 0.1) {
+                       if (range < 1) {
                                min = MIN(min, edl->local_session->automation_mins[i]);
                                max = MAX(max, edl->local_session->automation_maxs[i]);
+                               if( min >= max-0.1 ) { min = 0.0; min = 100.0; }
                        }
                        break;
                case AUTOGROUPTYPE_ZOOM:
@@ -198,9 +205,10 @@ void MWindow::fit_autos(int doall)
                        break;
                case AUTOGROUPTYPE_X:
                case AUTOGROUPTYPE_Y:
-                       if (range < 5) {
-                               min = floor((min+max)/2) - 50;
-                               max = floor((min+max)/2) + 50;
+                       if (range < 1) {
+                               float scale = bmin(edl->session->output_w, edl->session->output_h);
+                               min = floor((min+max)/2) - 0.5*scale;
+                               max = floor((min+max)/2) + 0.5*scale;
                        }
                        break;
                }
@@ -683,7 +691,7 @@ int MWindow::next_edit_handle(int shift_down)
 {
        double position = edl->local_session->get_selectionend(1);
        double new_position = edl->next_edit(position);
-       if(new_position != INFINITY) {
+       if( new_position < edl->tracks->total_length() ) {
                edl->local_session->set_selectionend(new_position);
 //printf("MWindow::next_edit_handle %d\n", shift_down);
                if(!shift_down)