From: Good Guy Date: Tue, 10 Mar 2020 23:09:41 +0000 (-0600) Subject: add sliders to cwdw proj/cam tools, edit id tweaks, deltrk shortcut tweak X-Git-Tag: 2020-03~16 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=c63c2c2707e1b1145db2edd6824bd69f59341e15;p=goodguy%2Fcinelerra.git add sliders to cwdw proj/cam tools, edit id tweaks, deltrk shortcut tweak --- diff --git a/cinelerra-5.1/cinelerra/automation.C b/cinelerra-5.1/cinelerra/automation.C index a407a489..c8556bf7 100644 --- a/cinelerra-5.1/cinelerra/automation.C +++ b/cinelerra-5.1/cinelerra/automation.C @@ -62,37 +62,36 @@ Automation::~Automation() } } -int Automation::autogrouptype(int autoidx, Track *track) +int Automation::autogrouptype(int type, Track *track) { - int autogrouptype = -1; - switch (autoidx) - { - case AUTOMATION_CAMERA_X: - case AUTOMATION_PROJECTOR_X: - autogrouptype = AUTOGROUPTYPE_X; - break; - case AUTOMATION_CAMERA_Y: - case AUTOMATION_PROJECTOR_Y: - autogrouptype = AUTOGROUPTYPE_Y; - break; - case AUTOMATION_CAMERA_Z: - case AUTOMATION_PROJECTOR_Z: - autogrouptype = AUTOGROUPTYPE_ZOOM; - break; - case AUTOMATION_SPEED: - autogrouptype = AUTOGROUPTYPE_SPEED; - break; - case AUTOMATION_FADE: - if (track->data_type == TRACK_AUDIO) - autogrouptype = AUTOGROUPTYPE_AUDIO_FADE; - else - autogrouptype = AUTOGROUPTYPE_VIDEO_FADE; - break; - case AUTOMATION_MUTE: - autogrouptype = AUTOGROUPTYPE_INT255; - break; + int group = -1; + switch( type ) { + case AUTOMATION_CAMERA_X: + case AUTOMATION_PROJECTOR_X: + group = AUTOGROUPTYPE_X; + break; + case AUTOMATION_CAMERA_Y: + case AUTOMATION_PROJECTOR_Y: + group = AUTOGROUPTYPE_Y; + break; + case AUTOMATION_CAMERA_Z: + case AUTOMATION_PROJECTOR_Z: + group = AUTOGROUPTYPE_ZOOM; + break; + case AUTOMATION_SPEED: + group = AUTOGROUPTYPE_SPEED; + break; + case AUTOMATION_FADE: + if (track->data_type == TRACK_AUDIO) + group = AUTOGROUPTYPE_AUDIO_FADE; + else + group = AUTOGROUPTYPE_VIDEO_FADE; + break; + case AUTOMATION_MUTE: + group = AUTOGROUPTYPE_INT255; + break; } - return (autogrouptype); + return group; } void Automation::create_objects() diff --git a/cinelerra-5.1/cinelerra/automation.h b/cinelerra-5.1/cinelerra/automation.h index 47df6eca..615a9d55 100644 --- a/cinelerra-5.1/cinelerra/automation.h +++ b/cinelerra-5.1/cinelerra/automation.h @@ -62,7 +62,7 @@ public: Automation(EDL *edl, Track *track); virtual ~Automation(); - int autogrouptype(int autoidx, Track *track); + static int autogrouptype(int type, Track *track); virtual void create_objects(); void equivalent_output(Automation *automation, int64_t *result); virtual Automation& operator=(Automation& automation); diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C index e18ebee3..f02a5905 100644 --- a/cinelerra-5.1/cinelerra/bdcreate.C +++ b/cinelerra-5.1/cinelerra/bdcreate.C @@ -80,9 +80,10 @@ const double CreateBD_Thread::BD_KAUDIO_RATE = 192; const int CreateBD_Thread::BD_INTERLACE_MODE = ILACE_MODE_NOTINTERLACED; CreateBD_MenuItem::CreateBD_MenuItem(MWindow *mwindow) - : BC_MenuItem(_("BD Render..."), _("Ctrl-d"), 'd') + : BC_MenuItem(_("BD Render..."), _("Ctrl-Shift-D"), 'D') { set_ctrl(1); + set_shift(1); this->mwindow = mwindow; } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index 2f284b10..8370ab97 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -37,6 +37,7 @@ #include "filexml.h" #include "floatauto.h" #include "floatautos.h" +#include "gwindowgui.h" #include "keys.h" #include "language.h" #include "localsession.h" @@ -52,6 +53,7 @@ #include "tracks.h" #include "trackcanvas.h" #include "transportque.h" +#include "zoombar.h" CWindowTool::CWindowTool(MWindow *mwindow, CWindowGUI *gui) @@ -343,25 +345,149 @@ void CWindowToolGUI::draw_preview(int changed_edl) } -CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, float value, int log_increment = 0) +CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, float value, int type) : BC_TumbleTextBox(gui, (float)value, (float)-65536, (float)65536, x, y, xS(70), 3) { this->gui = gui; - set_log_floatincrement(log_increment); + this->type = type; + slider = 0; + range = 0; } -CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, int value) +CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, int value, int type) : BC_TumbleTextBox(gui, (int64_t)value, (int64_t)-65536, (int64_t)65536, x, y, xS(70)) { this->gui = gui; + this->type = type; + slider = 0; + range = 0; } + +void CWindowCoord::create_objects() +{ + BC_TumbleTextBox::create_objects(); + if( type >= 0 ) { + int x1 = get_x() + BC_TumbleTextBox::get_w() + xS(10), y1 = get_y(); + int group = Automation::autogrouptype(type, 0); + float min = gui->mwindow->edl->local_session->automation_mins[group]; + float max = gui->mwindow->edl->local_session->automation_maxs[group]; + float v = atof(get_text()); + gui->add_subwindow(slider = new CWindowCoordSlider(this, + x1, y1, xS(150), min, max, v)); + x1 += slider->get_w() + xS(5); + gui->add_subwindow(range = new CWindowCoordRange(this, x1, y1)); + } +} + +void CWindowCoord::update_gui(float value) +{ + BC_TumbleTextBox::update(value); + if( slider ) { + int group = Automation::autogrouptype(type, 0); + LocalSession *local_session = gui->mwindow->edl->local_session; + slider->update(slider->get_pointer_motion_range(), value, + local_session->automation_mins[group], + local_session->automation_maxs[group]); + int x1 = range->get_x() + range->get_w() + xS(5); + int y1 = range->get_y() - yS(2), d = xS(16); + gui->set_color(GWindowGUI::auto_colors[type]); + gui->draw_disc(x1, y1, d, d); + } +} + int CWindowCoord::handle_event() { + if( slider ) + slider->update(atof(get_text())); gui->event_caller = this; gui->handle_event(); return 1; } +CWindowCoordSlider::CWindowCoordSlider(CWindowCoord *coord, + int x, int y, int w, float mn, float mx, float value) + : BC_FSlider(x, y, 0, w, w, mn, mx, value) +{ + this->coord = coord; + set_precision(0.01); +} + +CWindowCoordSlider::~CWindowCoordSlider() +{ +} + +int CWindowCoordSlider::handle_event() +{ + float value = get_value(); + coord->update(value); + coord->gui->event_caller = coord; + coord->gui->handle_event(); + return 1; +} + +CWindowCoordRange::CWindowCoordRange(CWindowCoord *coord, int x, int y) + : BC_Tumbler(x, y) +{ + this->coord = coord; +} +CWindowCoordRange::~CWindowCoordRange() +{ +} + +int CWindowCoordRange::update(float scale) +{ + MWindow *mwindow = coord->gui->mwindow; + LocalSession *local_session = mwindow->edl->local_session; + int group = Automation::autogrouptype(coord->type, 0); + float min = local_session->automation_mins[group]; + float max = local_session->automation_maxs[group]; + if( min >= max ) { + switch( group ) { + case AUTOGROUPTYPE_ZOOM: min = 0.005; max = 5.0; break; + case AUTOGROUPTYPE_X: min = -100; max = 100; break; + case AUTOGROUPTYPE_Y: min = -100; max = 100; break; + } + } + float range = max - min; + min -= range * scale; + max += range * scale; + switch( group ) { + case AUTOGROUPTYPE_ZOOM: + if( min < 0.001 ) min = 0.001; + if( max > 1000. ) max = 1000.; + break; + case AUTOGROUPTYPE_X: + case AUTOGROUPTYPE_Y: + if( min < -32767 ) min = -32767; + if( max > 32767 ) max = 32767; + break; + } + CWindowCoordSlider *slider = coord->slider; + coord->slider->update(slider->get_pointer_motion_range(), + slider->get_value(), min, max); + unlock_window(); + MWindowGUI *mgui = mwindow->gui; + mgui->lock_window("CWindowCoordRange::update"); + local_session->zoombar_showautotype = group; + local_session->automation_mins[group] = min; + local_session->automation_maxs[group] = max; + mgui->zoombar->update_autozoom(); + mgui->draw_overlays(0); + mgui->update_patchbay(); + mgui->flash_canvas(1); + mgui->unlock_window(); + lock_window("CWindowCoordRange::update"); + return 1; +} + +int CWindowCoordRange::handle_up_event() +{ + return update(0.5); +} +int CWindowCoordRange::handle_down_event() +{ + return update(-0.25); +} CWindowCropApply::CWindowCropApply(MWindow *mwindow, CWindowCropGUI *crop_gui, int x, int y) : BC_GenericButton(x, y, _("Apply")) @@ -796,7 +922,7 @@ int CWindowEyedropCheckBox::handle_event() CWindowCameraGUI::CWindowCameraGUI(MWindow *mwindow, CWindowTool *thread) - : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Camera"), xS(170), yS(170)) + : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Camera"), xS(340), yS(170)) { } CWindowCameraGUI::~CWindowCameraGUI() @@ -807,7 +933,7 @@ void CWindowCameraGUI::create_objects() { int xs10 = xS(10), xs15 = xS(15); int ys10 = yS(10), ys30 = yS(30); - int x = xs10, y = ys10, x1; + int x = xs10, y = ys10; Track *track = mwindow->cwindow->calculate_affected_track(); FloatAuto *x_auto = 0, *y_auto = 0, *z_auto = 0; BC_Title *title; @@ -820,27 +946,25 @@ void CWindowCameraGUI::create_objects() } add_subwindow(title = new BC_Title(x, y, "X:")); - x += title->get_w(); - this->x = new CWindowCoord(this, x, y, - x_auto ? x_auto->get_value() : (float)0); + int x1 = x + title->get_w() + xS(3); + float xvalue = x_auto ? x_auto->get_value() : 0; + this->x = new CWindowCoord(this, x1, y, xvalue, AUTOMATION_CAMERA_X); this->x->create_objects(); - - + this->x->range->set_tooltip(_("expand X range")); y += ys30; - x = xs10; - add_subwindow(title = new BC_Title(x, y, "Y:")); - x += title->get_w(); - this->y = new CWindowCoord(this, x, y, - y_auto ? y_auto->get_value() : (float)0); + add_subwindow(title = new BC_Title(x = xs10, y, "Y:")); + float yvalue = y_auto ? y_auto->get_value() : 0; + this->y = new CWindowCoord(this, x1, y, yvalue, AUTOMATION_CAMERA_Y); this->y->create_objects(); + this->y->range->set_tooltip(_("expand Y range")); y += ys30; - x = xs10; - add_subwindow(title = new BC_Title(x, y, "Z:")); + add_subwindow(title = new BC_Title(x = xs10, y, "Z:")); x += title->get_w(); - this->z = new CWindowCoord(this, x, y, - z_auto ? z_auto->get_value() : (float)1); + float zvalue = z_auto ? z_auto->get_value() : 1; + this->z = new CWindowCoord(this, x1, y, zvalue, AUTOMATION_CAMERA_Z); this->z->create_objects(); this->z->set_increment(0.01); + this->z->range->set_tooltip(_("expand Zoom range")); y += ys30; x1 = xs10; @@ -943,20 +1067,23 @@ void CWindowCameraGUI::update() &x_auto, &y_auto, &z_auto, 1, 0, 0, 0); } - if(x_auto) - x->update(x_auto->get_value()); - if(y_auto) - y->update(y_auto->get_value()); - if(z_auto) { - float value = z_auto->get_value(); - z->update(value); + if( x_auto ) { + float xvalue = x_auto->get_value(); + x->update_gui(xvalue); + } + if( y_auto ) { + float yvalue = y_auto->get_value(); + y->update_gui(yvalue); + } + if( z_auto ) { + float zvalue = z_auto->get_value(); + z->update_gui(zvalue); thread->gui->lock_window("CWindowCameraGUI::update"); - thread->gui->composite_panel->cpanel_zoom->update(value); + thread->gui->composite_panel->cpanel_zoom->update(zvalue); thread->gui->unlock_window(); } - if( x_auto && y_auto && z_auto ) - { + if( x_auto && y_auto && z_auto ) { t_smooth->check_toggle_state(x_auto, y_auto, z_auto); t_linear->check_toggle_state(x_auto, y_auto, z_auto); } @@ -1207,7 +1334,7 @@ int CWindowCameraReset::handle_event() CWindowProjectorGUI::CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread) - : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Projector"), xS(170), yS(170)) + : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Projector"), xS(340), yS(170)) { } CWindowProjectorGUI::~CWindowProjectorGUI() @@ -1231,29 +1358,28 @@ void CWindowProjectorGUI::create_objects() &x_auto, &y_auto, &z_auto, 0, 0, 0, 0); } - add_subwindow(title = new BC_Title(x, y, "X:")); - x += title->get_w(); - this->x = new CWindowCoord(this, x, y, - x_auto ? x_auto->get_value() : (float)0); + add_subwindow(title = new BC_Title(x = xs10, y, "X:")); + int x1 = x + title->get_w() + xS(3); + float xvalue = x_auto ? x_auto->get_value() : 0; + this->x = new CWindowCoord(this, x1, y, xvalue, AUTOMATION_PROJECTOR_X); this->x->create_objects(); + this->x->range->set_tooltip(_("expand X range")); y += ys30; - x = xs10; - add_subwindow(title = new BC_Title(x, y, "Y:")); - x += title->get_w(); - this->y = new CWindowCoord(this, x, y, - y_auto ? y_auto->get_value() : (float)0); + add_subwindow(title = new BC_Title(x = xs10, y, "Y:")); + float yvalue = y_auto ? y_auto->get_value() : 0; + this->y = new CWindowCoord(this, x1, y, yvalue, AUTOMATION_PROJECTOR_Y); this->y->create_objects(); + this->y->range->set_tooltip(_("expand Y range")); y += ys30; - x = xs10; - add_subwindow(title = new BC_Title(x, y, "Z:")); - x += title->get_w(); - this->z = new CWindowCoord(this, x, y, - z_auto ? z_auto->get_value() : (float)1); + add_subwindow(title = new BC_Title(x = xs10, y, "Z:")); + float zvalue = z_auto ? z_auto->get_value() : 1; + this->z = new CWindowCoord(this, x1, y, zvalue, AUTOMATION_PROJECTOR_Z); this->z->create_objects(); + this->z->range->set_tooltip(_("expand Zoom range")); this->z->set_increment(0.01); y += ys30; - int x1 = xs10; + x1 = xs10; add_subwindow(button = new CWindowProjectorLeft(mwindow, this, x1, y)); x1 += button->get_w(); add_subwindow(button = new CWindowProjectorCenter(mwindow, this, x1, y)); @@ -1352,20 +1478,23 @@ void CWindowProjectorGUI::update() &x_auto, &y_auto, &z_auto, 0, 0, 0, 0); } - if(x_auto) - x->update(x_auto->get_value()); - if(y_auto) - y->update(y_auto->get_value()); - if(z_auto) { - float value = z_auto->get_value(); - z->update(value); + if( x_auto ) { + float xvalue = x_auto->get_value(); + x->update_gui(xvalue); + } + if( y_auto ) { + float yvalue = y_auto->get_value(); + y->update_gui(yvalue); + } + if( z_auto ) { + float zvalue = z_auto->get_value(); + z->update_gui(zvalue); thread->gui->lock_window("CWindowProjectorGUI::update"); - thread->gui->composite_panel->cpanel_zoom->update(value); + thread->gui->composite_panel->cpanel_zoom->update(zvalue); thread->gui->unlock_window(); } - if( x_auto && y_auto && z_auto ) - { + if( x_auto && y_auto && z_auto ) { t_smooth->check_toggle_state(x_auto, y_auto, z_auto); t_linear->check_toggle_state(x_auto, y_auto, z_auto); } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.h b/cinelerra-5.1/cinelerra/cwindowtool.h index 6d02bf67..00e485e3 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.h +++ b/cinelerra-5.1/cinelerra/cwindowtool.h @@ -90,6 +90,7 @@ public: virtual void handle_event() {}; // Update text boxes from keyframe here virtual void update() {}; + // Update EDL and preview only void update_preview(int changed_edl=0); void draw_preview(int changed_edl); @@ -107,17 +108,43 @@ public: class CWindowCoord : public BC_TumbleTextBox { public: - CWindowCoord(CWindowToolGUI *gui, int x, int y, - float value, int logincrement); - CWindowCoord(CWindowToolGUI *gui, int x, int y, - int value); - + CWindowCoord(CWindowToolGUI *gui, int x, int y, float value, int group=-1); + CWindowCoord(CWindowToolGUI *gui, int x, int y, int value, int group=-1); + void create_objects(); + void update_gui(float value); // Calls the window's handle_event int handle_event(); CWindowToolGUI *gui; + CWindowCoordSlider *slider; + CWindowCoordRange *range; + int type; +}; + +class CWindowCoordSlider : public BC_FSlider +{ +public: + CWindowCoordSlider(CWindowCoord *coord, int x, int y, int w, + float mn, float mx, float value); + ~CWindowCoordSlider(); + int handle_event(); + + CWindowCoord *coord; }; +class CWindowCoordRange : public BC_Tumbler +{ +public: + CWindowCoordRange(CWindowCoord *coord, int x, int y); + ~CWindowCoordRange(); + int update(float scale); + int handle_up_event(); + int handle_down_event(); + + CWindowCoord *coord; +}; + + class CWindowCropApply : public BC_GenericButton { public: diff --git a/cinelerra-5.1/cinelerra/cwindowtool.inc b/cinelerra-5.1/cinelerra/cwindowtool.inc index 97a6bb88..af53c378 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.inc +++ b/cinelerra-5.1/cinelerra/cwindowtool.inc @@ -25,6 +25,8 @@ class CWindowTool; class CWindowToolGUI; class CWindowCoord; +class CWindowCoordSlider; +class CWindowCoordRange; class CWindowCropApply; class CWindowCropOpMode; class CWindowCropOpItem; diff --git a/cinelerra-5.1/cinelerra/edit.C b/cinelerra-5.1/cinelerra/edit.C index f5a06bbf..72f17990 100644 --- a/cinelerra-5.1/cinelerra/edit.C +++ b/cinelerra-5.1/cinelerra/edit.C @@ -279,6 +279,12 @@ void Edit::copy_from(Edit *edit) this->channel = edit->channel; } +void Edit::clone_from(Edit *edit) +{ + copy_from(edit); + edit->orig_id = edit->id; +} + void Edit::equivalent_output(Edit *edit, int64_t *result) { // End of edit changed @@ -320,13 +326,6 @@ void Edit::equivalent_output(Edit *edit, int64_t *result) } -Edit& Edit::operator=(Edit& edit) -{ -//printf("Edit::operator= called\n"); - copy_from(&edit); - return *this; -} - void Edit::synchronize_params(Edit *edit) { copy_from(edit); @@ -346,11 +345,6 @@ int Edit::identical(Edit &edit) return result; } -int Edit::operator==(Edit &edit) -{ - return identical(edit); -} - double Edit::frames_per_picon() { return Units::round(picon_w()) / frame_w(); @@ -386,8 +380,8 @@ int Edit::picon_h() int Edit::dump(FILE *fp) { fprintf(fp," EDIT %p\n", this); fflush(fp); - fprintf(fp," nested_edl=%p %s asset=%p %s\n", - nested_edl, nested_edl ? nested_edl->path : "", + fprintf(fp," id %d, orig_id %d, nested_edl=%p %s asset=%p %s\n", + id, orig_id, nested_edl, nested_edl ? nested_edl->path : "", asset, asset ? asset->path : ""); fflush(fp); fprintf(fp," channel %d, color %08x, hard lt/rt %d/%d" diff --git a/cinelerra-5.1/cinelerra/edit.h b/cinelerra-5.1/cinelerra/edit.h index a21df403..51cdb7a2 100644 --- a/cinelerra-5.1/cinelerra/edit.h +++ b/cinelerra-5.1/cinelerra/edit.h @@ -54,13 +54,12 @@ public: Indexable* get_source(); // Copy from different EDL virtual void copy_from(Edit *edit); + virtual void clone_from(Edit *edit); // Compare with edit in same EDL virtual int identical(Edit &edit); - virtual Edit& operator=(Edit& edit); // Called by Edits and PluginSet. // Compare with edit in different EDL virtual void equivalent_output(Edit *edit, int64_t *result); - virtual int operator==(Edit& edit); // When inherited by a plugin need to resample keyframes virtual void synchronize_params(Edit *edit); // Used by Edits::insert_edits to shift plugin keyframes diff --git a/cinelerra-5.1/cinelerra/edits.C b/cinelerra-5.1/cinelerra/edits.C index 8c8901bf..ea67b6cb 100644 --- a/cinelerra-5.1/cinelerra/edits.C +++ b/cinelerra-5.1/cinelerra/edits.C @@ -102,15 +102,6 @@ void Edits::copy_from(Edits *edits) } } - -Edits& Edits::operator=(Edits& edits) -{ -printf("Edits::operator= 1\n"); - copy_from(&edits); - return *this; -} - - void Edits::insert_asset(Asset *asset, EDL *nested_edl, int64_t length, int64_t position, int track_number) { @@ -178,7 +169,7 @@ void Edits::insert_edits(Edits *source_edits, // Open destination area Edit *dest_edit = insert_new_edit(position + source_edit->startproject); - dest_edit->copy_from(source_edit); + dest_edit->clone_from(source_edit); dest_edit->asset = dest_asset; dest_edit->nested_edl = dest_nested_edl; dest_edit->startproject = position + source_edit->startproject; @@ -242,7 +233,7 @@ Edit* Edits::split_edit(int64_t position) Edit *new_edit = create_edit(); insert_after(edit, new_edit); - new_edit->copy_from(edit); + new_edit->clone_from(edit); new_edit->length = new_edit->startproject + new_edit->length - position; edit->length = position - edit->startproject; if( !new_edit->length || edit->silence() ) diff --git a/cinelerra-5.1/cinelerra/edits.h b/cinelerra-5.1/cinelerra/edits.h index 76c0171d..efd7f88e 100644 --- a/cinelerra-5.1/cinelerra/edits.h +++ b/cinelerra-5.1/cinelerra/edits.h @@ -43,7 +43,6 @@ public: void equivalent_output(Edits *edits, int64_t *result); virtual void copy_from(Edits *edits); - virtual Edits& operator=(Edits& edits); // Insert edits from different EDL void insert_edits(Edits *edits, int64_t position, diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index 25496d4b..d639106d 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -1925,7 +1925,7 @@ EDL *EDL::selected_edits_to_clip(int packed, } int64_t clip_start_pos = startproject; Edit *clip_edit = new Edit(new_edl, new_track); - clip_edit->copy_from(edit); + clip_edit->clone_from(edit); clip_edit->startproject = startproject; startproject += clip_edit->length; new_track->edits->append(clip_edit); @@ -2055,7 +2055,7 @@ void EDL::paste_edits(EDL *clip, Track *first_track, double position, int overwr if( overwrite ) track->edits->clear(start, end); Edit *dst = track->edits->insert_new_edit(start); - dst->copy_from(edit); + dst->clone_from(edit); dst->startproject = start; dst->is_selected = 1; while( (dst=dst->next) != 0 ) diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 39e7ef0c..f1b980cb 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -1247,10 +1247,9 @@ int DeleteFirstTrack::handle_event() } DeleteLastTrack::DeleteLastTrack(MWindow *mwindow) - : BC_MenuItem(_("Delete last track"), "Ctrl-Shift-D", 'D') + : BC_MenuItem(_("Delete last track"), "Ctrl-d", 'd') { set_ctrl(1); - set_shift(1); this->mwindow = mwindow; } diff --git a/cinelerra-5.1/cinelerra/plugin.C b/cinelerra-5.1/cinelerra/plugin.C index 4a34141c..d884f707 100644 --- a/cinelerra-5.1/cinelerra/plugin.C +++ b/cinelerra-5.1/cinelerra/plugin.C @@ -78,28 +78,6 @@ Plugin::~Plugin() delete keyframes; } -Edit& Plugin::operator=(Edit& edit) -{ - copy_from(&edit); - return *this; -} - -Plugin& Plugin::operator=(Plugin& edit) -{ - copy_from(&edit); - return *this; -} - -int Plugin::operator==(Plugin& that) -{ - return identical(&that); -} - -int Plugin::operator==(Edit& that) -{ - return identical((Plugin*)&that); -} - int Plugin::silence() { return plugin_type == PLUGIN_NONE ? 1 : 0; @@ -579,8 +557,8 @@ void Plugin::shift(int64_t difference) void Plugin::dump(FILE *fp) { - fprintf(fp," PLUGIN: type=%d title=\"%s\" on=%d track=%d plugin=%d gui_id=%d\n", - plugin_type, title, on, shared_location.module, shared_location.plugin, gui_id); + fprintf(fp," PLUGIN: type=%d, id %d, orig_id %d, title=\"%s\" on=%d track=%d plugin=%d gui_id=%d\n", + plugin_type, id, orig_id, title, on, shared_location.module, shared_location.plugin, gui_id); fprintf(fp," startproject %jd length %jd\n", startproject, length); keyframes->dump(fp); diff --git a/cinelerra-5.1/cinelerra/plugin.h b/cinelerra-5.1/cinelerra/plugin.h index 92eff4f0..a0bd80b4 100644 --- a/cinelerra-5.1/cinelerra/plugin.h +++ b/cinelerra-5.1/cinelerra/plugin.h @@ -59,9 +59,6 @@ public: const char *title); virtual ~Plugin(); - virtual Plugin& operator=(Plugin& edit); - virtual Edit& operator=(Edit& edit); - // Called by Edits::equivalent_output to override the keyframe behavior and check // title. void equivalent_output(Edit *edit, int64_t *result); @@ -71,9 +68,6 @@ public: // Descends the plugin tree without creating a virtual console. int is_synthesis(int64_t position, int direction, int depth); - virtual int operator==(Plugin& that); - virtual int operator==(Edit& that); - void init(const char *title, int64_t unit_position, int64_t unit_length, int plugin_type, SharedLocation *shared_location, KeyFrame *default_keyframe); @@ -81,7 +75,6 @@ public: virtual void copy_from(Edit *edit); -// Called by == operators, Edit::equivalent output // to test title and keyframe of transition. virtual int identical(Plugin *that); virtual void synchronize_params(Edit *edit); diff --git a/cinelerra-5.1/cinelerra/zoombar.C b/cinelerra-5.1/cinelerra/zoombar.C index 60ed04c5..20e4a9ae 100644 --- a/cinelerra-5.1/cinelerra/zoombar.C +++ b/cinelerra-5.1/cinelerra/zoombar.C @@ -21,6 +21,8 @@ #include "apatchgui.inc" #include "clip.h" +#include "cwindow.h" +#include "cwindowgui.h" #include "edl.h" #include "edlsession.h" #include "keys.h" @@ -188,6 +190,18 @@ void ZoomBar::update_autozoom(int color) auto_zoom_text->update(string); const char *group_name = AutoTypeMenu::to_text(autogroup_type); auto_type->set_text(group_name); + switch( autogroup_type ) { + case AUTOGROUPTYPE_ZOOM: + case AUTOGROUPTYPE_X: + case AUTOGROUPTYPE_Y: + CWindowGUI *cgui = mwindow->cwindow->gui; + unlock_window(); + cgui->lock_window("ZoomBar::update_autozoom"); + cgui->update_tool(); + cgui->unlock_window(); + lock_window("ZoomBar::update_autozoom"); + break; + } } diff --git a/cinelerra-5.1/doc/shortcuts.html b/cinelerra-5.1/doc/shortcuts.html index ba6987e2..d59f0dfe 100644 --- a/cinelerra-5.1/doc/shortcuts.html +++ b/cinelerra-5.1/doc/shortcuts.html @@ -123,7 +123,7 @@ BD Render… - 'Ctrl-d' + 'Ctrl-Shift-D' Open create bluray disk window @@ -459,7 +459,7 @@
Delete last track - 'Ctrl-Shift-D' + 'Ctrl-d' Delete last track diff --git a/cinelerra-5.1/po/de.po b/cinelerra-5.1/po/de.po index edaa83fa..ee9d3bb9 100644 --- a/cinelerra-5.1/po/de.po +++ b/cinelerra-5.1/po/de.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: cinelerra 5.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-12-18 10:15+0100\n" -"PO-Revision-Date: 2019-12-18 11:54+0100\n" +"PO-Revision-Date: 2019-12-29 14:28+0100\n" "Last-Translator: Olaf \n" "Language-Team: Language-Team German \n" "Language: de\n" @@ -458,7 +458,7 @@ msgstr "Frames pro Fuß:" #: plugins/chromakeyhsv/chromakey.C:187 plugins/sketcher/sketcherwindow.C:334 #: plugins/sketcher/sketcherwindow.C:335 plugins/titler/titlerwindow.C:352 msgid "Color:" -msgstr "Farbe:" +msgstr "Farben:" #: cinelerra/appearanceprefs.C:175 msgid "Highlighting Inversion color:" @@ -466,7 +466,7 @@ msgstr "Hervorhebung der Inversionsfarbe" #: cinelerra/appearanceprefs.C:182 msgid "Composer BG Color:" -msgstr "Composer HG Farbe:" +msgstr "Composer Leinwand Farbe:" #: cinelerra/appearanceprefs.C:192 msgid "YUV color space:" @@ -5852,7 +5852,7 @@ msgid "Nest sequence" msgstr "Nest-Sequenz" #: cinelerra/loadmode.C:118 cinelerra/loadmode.C:167 -msgid "Load strategy:" +msgid "Insertion strategy:" msgstr "Einfügestrategie:" #: cinelerra/localsession.C:63 @@ -6412,7 +6412,7 @@ msgstr "%d Zeichen aus: a-Z 0-9 _" #: cinelerra/mainmenu.C:1948 msgid "Load Recent..." -msgstr "" +msgstr "Zuletzt geöffnet …" #: cinelerra/mainprogress.C:169 #, c-format @@ -13300,7 +13300,7 @@ msgstr "Hochgestellt" msgid "Font:" msgstr "Schrift:" -# Textlänge! +# Textlänge! Grundlinienabstand (line spacing) wäre korrekt. #: plugins/titler/titlerwindow.C:248 msgid "Pitch:" msgstr ""