X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=97ee1ceb260b02849b6f7e0c3545c92674cfc748;hb=b2dd11566e4788acc8d38bdfbc20c8d5772106e5;hp=7cb5a1007d5bde2bdd77632f505f22e1f43eab0d;hpb=b5bfe3e40a7255ae60a21d885587ada6e145e3d5;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 7cb5a100..97ee1ceb 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -58,6 +58,7 @@ #include "tracks.h" #include "transportque.h" #include "vtrack.h" +#include "zoombar.h" static double my_zoom_table[] = @@ -281,7 +282,7 @@ int CWindowGUI::button_press_event() if( current_operation == CWINDOW_NONE && mwindow->edl != 0 && canvas->get_canvas() && mwindow->edl->session->cwindow_click2play && - canvas->get_canvas()->get_cursor_over_window() ) { + canvas->get_canvas()->cursor_above() ) { switch( get_buttonpress() ) { case LEFT_BUTTON: if( !cwindow->playback_engine->is_playing_back ) { @@ -744,7 +745,7 @@ CWindowEditing::CWindowEditing(MWindow *mwindow, CWindow *cwindow) mwindow->theme->cedit_x, mwindow->theme->cedit_y, mwindow->edl->session->editing_mode, 0, // use_editing_mode - 1, // use_keyframe + 0, // use_keyframe 0, // use_splice 0, // use_overwrite 1, // use_copy @@ -1094,14 +1095,21 @@ int CWindowCanvas::do_scroll(EDL *edl, float cursor_x, float cursor_y) int CWindowCanvas::scope_on() { - return !gui->edit_panel->scope_dialog ? 0 : - gui->edit_panel->scope_dialog->running(); + EditPanelScopeDialog *scope_dialog = gui->edit_panel->scope_dialog; + if( !scope_dialog || !scope_dialog->scope_gui ) return 0; + if( scope_dialog->scope_gui->use_refresh ) return 0; + if( scope_dialog->scope_gui->use_release ) return 0; + return scope_dialog->running(); } -void CWindowCanvas::draw_scope(VFrame *output) +void CWindowCanvas::draw_scope(VFrame *output, int refresh) { - if( gui->edit_panel->scope_dialog ) - gui->edit_panel->scope_dialog->process(output); + if( !output ) return; + EditPanelScopeDialog *scope_dialog = gui->edit_panel->scope_dialog; + if( !scope_dialog || !scope_dialog->scope_gui ) return; + if( scope_dialog->scope_gui->use_refresh && !refresh ) return; + if( scope_dialog->scope_gui->use_release && refresh >= 0 ) return; + scope_dialog->process(output); } void CWindowCanvas::draw_refresh(int flush) @@ -2632,6 +2640,11 @@ void CWindowCanvas::reset_keyframe(int do_camera) z_keyframe->set_value(1); gui->sync_parameters(CHANGE_PARAMS, 1, 1); + MWindowGUI *mgui = mwindow->gui; + mgui->lock_window("CWindowCanvas::reset_keyframe"); + gui->mwindow->edl->local_session->reset_view_limits(); + gui->mwindow->gui->zoombar->update_autozoom(); + mgui->unlock_window(); } } @@ -3331,6 +3344,9 @@ int CWindowCanvas::button_release_event() { int result = 0; const char *undo_label = 0; + BC_WindowBase *window = get_canvas(); + if( window && !window->get_video_on() ) + draw_scope(refresh_frame, -1); switch( gui->current_operation ) { case CWINDOW_SCROLL: