- if( current->data_type == data_type && current->is_armed() ) {
- double start = edl->local_session->get_selectionstart(1);
- double end = edl->local_session->get_selectionend(1);
- double length = end - start;
- if( start >= end ) {
- start = 0;
- length = current->get_length();
- }
- insert_effect(title, &shared_location_local,
+ if( current->data_type != data_type ) continue;
+ if( !current->is_armed() ) continue;
+ double start = start_pos, end = end_pos;
+ if( plugin_type == PLUGIN_STANDALONE && start >= end ) {
+ start = 0;
+ end = current->get_length();
+ }
+ double length = end - start;
+ insert_effect(title, &shared_location_local,