fix edl break created by creating a clip in open edl edit mode
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / localsession.C
index 7e1f50eaeb030eede38dd7bff30822f6e2d6d66d..47d86c28f239cc4113423667d66c3d57d043f35d 100644 (file)
@@ -86,7 +86,7 @@ LocalSession::LocalSession(EDL *edl)
        automation_maxs[AUTOGROUPTYPE_AUDIO_FADE] = 6;
        automation_mins[AUTOGROUPTYPE_VIDEO_FADE] = 0;
        automation_maxs[AUTOGROUPTYPE_VIDEO_FADE] = 100;
-       automation_mins[AUTOGROUPTYPE_SPEED] = 0.005;
+       automation_mins[AUTOGROUPTYPE_SPEED] = SPEED_MIN;
        automation_maxs[AUTOGROUPTYPE_SPEED] = 5.000;
        automation_mins[AUTOGROUPTYPE_INT255] = 0;
        automation_maxs[AUTOGROUPTYPE_INT255] = 255;
@@ -296,7 +296,9 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags)
                for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                        if (!Automation::autogrouptypes_fixedrange[i]) {
                                automation_mins[i] = file->tag.get_property(xml_autogrouptypes_titlesmin[i],automation_mins[i]);
+                               AUTOMATIONCLAMPS(automation_mins[i], i);
                                automation_maxs[i] = file->tag.get_property(xml_autogrouptypes_titlesmax[i],automation_maxs[i]);
+                               AUTOMATIONCLAMPS(automation_maxs[i], i);
                        }
                }
                floatauto_type = file->tag.get_property("FLOATAUTO_TYPE", floatauto_type);
@@ -345,9 +347,9 @@ int LocalSession::load_defaults(BC_Hash *defaults)
 //     track_start = defaults->get("TRACK_START", 0);
 //     view_start = defaults->get("VIEW_START", 0);
        zoom_sample = defaults->get("ZOOM_SAMPLE", DEFAULT_ZOOM_TIME);
-       zoom_y = defaults->get("ZOOMY", 64);
+       zoom_y = defaults->get("ZOOMY", DEFAULT_ZOOM_TRACK);
        int64_t zoom_track = defaults->get("ZOOM_TRACK", 0);
-       if( zoom_track == 0 ) zoom_track = 64;
+       if( zoom_track == 0 ) zoom_track = DEFAULT_ZOOM_TRACK;
        zoom_atrack = defaults->get("ZOOM_ATRACK", zoom_track);
        zoom_vtrack = defaults->get("ZOOM_VTRACK", zoom_track);
        red = defaults->get("RED", 0.0);
@@ -361,7 +363,9 @@ int LocalSession::load_defaults(BC_Hash *defaults)
        for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                if (!Automation::autogrouptypes_fixedrange[i]) {
                        automation_mins[i] = defaults->get(xml_autogrouptypes_titlesmin[i], automation_mins[i]);
+                       AUTOMATIONCLAMPS(automation_mins[i], i);
                        automation_maxs[i] = defaults->get(xml_autogrouptypes_titlesmax[i], automation_maxs[i]);
+                       AUTOMATIONCLAMPS(automation_maxs[i], i);
                }
        }