Two fixes for pluggin dragging
one in tracksedit.C actually fixes a crush - pluginset editlist was not kept in
correct state and it was behaving wrong anyway (on screen highlights were
different than the true actions move_effect took..., i changed actions to match
highlights)
one in trackcanvas.C that makes sure that we have WYSIWYG in one of the cases
...
unbelievably both fixes remove more code than they add
bye
andraz
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/trackcanvas.C hvirtual-2.1/cinelerra/trackcanvas.C
--- hvirtual-svn/cinelerra/trackcanvas.C 2007-02-09 22:24:39.000000000 +0100
+++ hvirtual-2.1/cinelerra/trackcanvas.C 2007-02-10 17:08:49.000000000 +0100
@@ -377,18 +377,6 @@
mwindow->session->current_operation = NO_OPERATION;
// Insert shared plugin in source
- if(mwindow->session->track_highlighted != mwindow->session->drag_plugin->track &&
- !mwindow->session->plugin_highlighted &&
- !mwindow->session->pluginset_highlighted)
- {
-// Move plugin if different startproject
- mwindow->move_effect(mwindow->session->drag_plugin,
- 0,
- mwindow->session->track_highlighted,
- 0);
- result = 1;
- }
- else
// Move source to different location
if(mwindow->session->pluginset_highlighted)
{
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/tracksedit.C hvirtual-2.1/cinelerra/tracksedit.C
--- hvirtual-svn/cinelerra/tracksedit.C 2007-02-10 12:53:20.000000000 +0100
+++ hvirtual-2.1/cinelerra/tracksedit.C 2007-02-10 17:11:30.000000000 +0100
@@ -370,27 +370,8 @@
else
// Create a new plugin set
{
- double length = 0;
- double start = 0;
- if(edl->local_session->get_selectionend() >
- edl->local_session->get_selectionstart())
- {
- start = edl->local_session->get_selectionstart();
- length = edl->local_session->get_selectionend() -
- start;
- }
- else
- if(dest_track->get_length() > 0)
- {
- start = 0;
- length = dest_track->get_length();
- }
- else
- {
- start = 0;
- length = dest_track->from_units(plugin->length);
- }
-
+ double start = dest_track->from_units(dest_position);
+ double length = dest_track->from_units(plugin->length);
result = dest_track->insert_effect("",
&plugin->shared_location,
@@ -399,8 +380,8 @@
start,
length,
plugin->plugin_type);
- }
+ }
result->copy_from(plugin);