diff -u -x 'Make*' hvirtual-cvs/cinelerra/auto.C hvirtual-1.1.8/cinelerra/auto.C
--- hvirtual-cvs/cinelerra/auto.C	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/auto.C	2004-01-24 21:56:02.000000000 +0100
@@ -48,6 +48,11 @@
 	this->position = that->position;
 }
 
+int Auto::interpolate_from(Auto *a1, Auto *a2, int64_t position)
+{
+	copy_from(a1);
+	return 0;
+}
 
 void Auto::load(FileXML *xml)
 {
diff -u -x 'Make*' hvirtual-cvs/cinelerra/auto.h hvirtual-1.1.8/cinelerra/auto.h
--- hvirtual-cvs/cinelerra/auto.h	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/auto.h	2004-01-24 21:38:38.000000000 +0100
@@ -24,6 +24,9 @@
 	virtual Auto& operator=(Auto &that);
 	virtual int operator==(Auto &that);
 	virtual void copy_from(Auto *that);
+	/* for interpolation creation */
+	/* if not possible, copy from a1 and return 0*/ 	
+	virtual int interpolate_from(Auto *a1, Auto *a2, int64_t position); 
 	virtual void copy(int64_t start, int64_t end, FileXML *file, int default_only);
 
 	virtual void load(FileXML *file);
diff -u -x 'Make*' hvirtual-cvs/cinelerra/autos.C hvirtual-1.1.8/cinelerra/autos.C
--- hvirtual-cvs/cinelerra/autos.C	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/autos.C	2004-01-24 22:57:48.000000000 +0100
@@ -259,7 +259,7 @@
 
 	if(edl->session->auto_keyframes)
 	{
-		result = insert_auto(track->to_units(position, 0));
+		result = insert_auto_for_editing(track->to_units(position, 0));
 	}
 	else
 		result = get_prev_auto(track->to_units(position, 0), 
@@ -362,6 +362,55 @@
 	return result;
 }
 
+Auto* Autos::insert_auto_for_editing(int64_t position)
+{
+	Auto *current, *result;
+
+// Test for existence
+	for(current = first; 
+		current && !edl->equivalent(current->position, position); 
+		current = NEXT)
+	{
+		;
+	}
+
+//printf("Autos::insert_auto_for_editing %p\n", current);
+// Insert new
+	if(!current)
+	{
+// Get first one on or before as a template
+		for(current = last; 
+			current && current->position > position; 
+			current = PREVIOUS)
+		{
+			;
+		}
+
+		if(current)
+		{
+			Auto *next = NEXT;
+			insert_after(current, result = new_auto());
+			result->interpolate_from(current, next, position);
+		}
+		else
+		{
+			current = first;
+			if(!current) current = default_auto;
+
+			insert_before(first, result = new_auto());
+			if(current) result->copy_from(current);
+		}
+
+		result->position = position;
+	}
+	else
+	{
+		result = current;
+	}
+
+	return result;
+}
+
 int Autos::clear_all()
 {
 	Auto *current_, *current;
diff -u -x 'Make*' hvirtual-cvs/cinelerra/autos.h hvirtual-1.1.8/cinelerra/autos.h
--- hvirtual-cvs/cinelerra/autos.h	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/autos.h	2004-01-24 22:17:01.000000000 +0100
@@ -41,6 +41,9 @@
 	Auto* get_auto_for_editing(double position = -1);
 // Insert keyframe at the point if it doesn't exist
 	Auto* insert_auto(int64_t position);
+// Insert keyframe at the point if it doesn't exist
+// Interpolate it insead of copying
+	Auto* insert_auto_for_editing(int64_t position);
 	void insert_track(Autos *automation, 
 		int64_t start_unit, 
 		int64_t length_units,
diff -u -x 'Make*' hvirtual-cvs/cinelerra/cwindowgui.C hvirtual-1.1.8/cinelerra/cwindowgui.C
--- hvirtual-cvs/cinelerra/cwindowgui.C	2004-01-22 02:06:48.000000000 +0100
+++ hvirtual-1.1.8/cinelerra/cwindowgui.C	2004-01-24 20:37:38.000000000 +0100
@@ -1296,6 +1296,7 @@
 		}
 
 		result = 1;
+		rerender = 1;
 		redraw = 1;
 	}
 //printf("CWindowCanvas::do_mask 7\n");
@@ -2675,6 +2676,17 @@
 		draw_refresh();
 		gui->update_tool();
 	}
+
+	if(rerender) /* rerendering can also be caused by press event */
+	{
+		mwindow->restart_brender();
+		mwindow->sync_parameters(CHANGE_PARAMS);
+		gui->cwindow->playback_engine->que->send_command(CURRENT_FRAME, 
+			CHANGE_NONE,
+			mwindow->edl,
+			1);
+		if(!redraw) gui->update_tool();
+	}
 	return result;
 }
 
diff -u -x 'Make*' hvirtual-cvs/cinelerra/maskauto.C hvirtual-1.1.8/cinelerra/maskauto.C
--- hvirtual-cvs/cinelerra/maskauto.C	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/maskauto.C	2004-01-24 22:51:04.000000000 +0100
@@ -249,6 +249,51 @@
 	}
 }
 
+
+int MaskAuto::interpolate_from(Auto *a1, Auto *a2, int64_t position) {
+	MaskAuto  *mask_auto1 = (MaskAuto *)a1;
+	MaskAuto  *mask_auto2 = (MaskAuto *)a2;
+
+	if (!mask_auto2 || mask_auto2->masks.total == 0) // if mask_auto == null, copy from first
+	{
+		copy_from(mask_auto1);
+		return 0;
+	}
+	this->mode = mask_auto1->mode;
+	this->feather = mask_auto1->feather;
+	this->value = mask_auto1->value;
+	this->position = position;
+	masks.remove_all_objects();
+
+	for(int i = 0; 
+		i < mask_auto1->masks.total; 
+		i++)
+	{
+		SubMask *new_submask = new SubMask(this);
+		masks.append(new_submask);
+		SubMask *mask1 = mask_auto1->masks.values[i];
+		SubMask *mask2 = mask_auto2->masks.values[i];
+
+		// just in case, should never happen
+		int total_points = MIN(mask1->points.total, mask2->points.total);
+		for(int j = 0; j < total_points; j++)
+		{
+			MaskPoint *point = new MaskPoint;
+			MaskAutos::avg_points(point, 
+				mask1->points.values[j], 
+				mask2->points.values[j],
+				position,
+				mask_auto1->position,
+				mask_auto2->position);
+			new_submask->points.append(point);
+		}
+
+	}
+
+
+}
+
+
 SubMask* MaskAuto::get_submask(int number)
 {
 	CLAMP(number, 0, masks.total - 1);
diff -u -x 'Make*' hvirtual-cvs/cinelerra/maskauto.h hvirtual-1.1.8/cinelerra/maskauto.h
--- hvirtual-cvs/cinelerra/maskauto.h	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/maskauto.h	2004-01-24 21:35:14.000000000 +0100
@@ -50,6 +50,7 @@
 	void load(FileXML *file);
 	void copy(int64_t start, int64_t end, FileXML *file, int default_auto);
 	void copy_from(Auto *src);
+	int interpolate_from(Auto *a1, Auto *a2, int64_t position); 
 	void copy_from(MaskAuto *src);
 
 	void dump();
diff -u -x 'Make*' hvirtual-cvs/cinelerra/maskautos.h hvirtual-1.1.8/cinelerra/maskautos.h
--- hvirtual-cvs/cinelerra/maskautos.h	2003-10-05 00:06:15.000000000 +0200
+++ hvirtual-1.1.8/cinelerra/maskautos.h	2004-01-24 21:34:40.000000000 +0100
@@ -18,7 +18,7 @@
 
 	int dump();
 
-	void avg_points(MaskPoint *output, 
+	static void avg_points(MaskPoint *output, 
 		MaskPoint *input1, 
 		MaskPoint *input2, 
 		int64_t output_position,
