From: Good Guy Date: Wed, 31 Aug 2016 17:29:37 +0000 (-0600) Subject: fixes for selection and popup behaviors X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=c9de74551f43dad1b898603c0827985773c0cf9d;p=goodguy%2Fhistory.git fixes for selection and popup behaviors --- diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 6e72494a..157090ef 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -2006,7 +2006,7 @@ void MWindowGUI::load_panes() cursor_y, mwindow->theme->mcanvas_x + mwindow->theme->mcanvas_w - - cursor_x, + cursor_x - mwindow->theme->pane_w, mwindow->theme->mcanvas_h - cursor_y); pane[TOP_RIGHT_PANE]->create_objects(); @@ -2037,7 +2037,7 @@ void MWindowGUI::load_panes() cursor_y, mwindow->theme->mcanvas_x + mwindow->theme->mcanvas_w - - cursor_x, + cursor_x - mwindow->theme->pane_w, mwindow->theme->mcanvas_h - cursor_y); pane[BOTTOM_RIGHT_PANE]->resize_event( diff --git a/cinelerra-5.1/cinelerra/mwindowmove.C b/cinelerra-5.1/cinelerra/mwindowmove.C index 62460c51..cffc71df 100644 --- a/cinelerra-5.1/cinelerra/mwindowmove.C +++ b/cinelerra-5.1/cinelerra/mwindowmove.C @@ -884,6 +884,7 @@ void MWindow::split_x() gui->mainmenu->update_toggles(0); gui->update_pane_dividers(); gui->update_cursor(); + gui->draw_samplemovement(); // required to get new widgets to appear gui->show_window(); @@ -907,6 +908,7 @@ void MWindow::split_y() gui->mainmenu->update_toggles(0); gui->update_pane_dividers(); gui->update_cursor(); + gui->draw_trackmovement(); // required to get new widgets to appear gui->show_window(); gui->resource_thread->start_draw(); diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index 661f473b..1c2c50fc 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -4217,7 +4217,11 @@ int TrackCanvas::button_release_event() default: - if(mwindow->session->current_operation) { + if( !mwindow->session->current_operation ) { + if( get_buttonpress() == 3 ) + result = do_edit_popup(); + } + else { // if(mwindow->session->current_operation == SELECT_REGION) { // mwindow->undo->update_undo_after(_("select"), LOAD_SESSION, 0, 0); // } @@ -4389,8 +4393,13 @@ int TrackCanvas::do_plugin_handles(int cursor_x, int TrackCanvas::do_tracks(int cursor_x, int cursor_y, int button_press) { - int result = 0; + return 0; +} +int TrackCanvas::do_edit_popup() +{ + int result = 0; + int cursor_y = get_cursor_y(); // if(!mwindow->edl->session->show_assets) return 0; for(Track *track = mwindow->edl->tracks->first; @@ -4399,8 +4408,7 @@ int TrackCanvas::do_tracks(int cursor_x, int cursor_y, int button_press) int64_t track_x, track_y, track_w, track_h; track_dimensions(track, track_x, track_y, track_w, track_h); - if(button_press && get_buttonpress() == 3 && - cursor_y >= track_y && cursor_y < track_y + track_h) { + if( cursor_y >= track_y && cursor_y < track_y + track_h ) { gui->edit_menu->update(track, 0); gui->edit_menu->activate_menu(); result = 1; @@ -4721,8 +4729,7 @@ int TrackCanvas::button_press_event() switch(mwindow->edl->session->editing_mode) { // Test handles and resource boundaries and highlight a track case EDITING_ARROW: { - if( mwindow->edl->session->auto_conf->transitions && - do_transitions(cursor_x, cursor_y, + if( do_transitions(cursor_x, cursor_y, 1, new_cursor, update_cursor) ) break; if( do_keyframes(cursor_x, cursor_y, @@ -4761,8 +4768,7 @@ int TrackCanvas::button_press_event() mwindow->edl->session->sample_rate; //printf("TrackCanvas::button_press_event %d\n", position); - if(mwindow->edl->session->auto_conf->transitions && - do_transitions(cursor_x, cursor_y, + if( do_transitions(cursor_x, cursor_y, 1, new_cursor, update_cursor)) break; if(do_keyframes(cursor_x, cursor_y, 0, get_buttonpress(), new_cursor, @@ -4784,6 +4790,7 @@ int TrackCanvas::button_press_event() if( do_tracks(cursor_x, cursor_y, 1) ) break; // Highlight selection + if( get_buttonpress() != LEFT_BUTTON ) break; rerender = start_selection(position); mwindow->session->current_operation = SELECT_REGION; update_cursor = 1; @@ -4803,17 +4810,17 @@ int TrackCanvas::button_press_event() if( update_overlay ) { gui->draw_overlays(1); } - - if( update_cursor > 0 ) { + if( update_cursor < 0 ) { +// double_click edit + gui->swindow->update_selection(); + } + if( update_cursor ) { gui->update_timebar(0); gui->hide_cursor(0); gui->show_cursor(1); gui->zoombar->update(); gui->flash_canvas(1); } - else if(update_cursor < 0) { - gui->swindow->update_selection(); - } } return result; } diff --git a/cinelerra-5.1/cinelerra/trackcanvas.h b/cinelerra-5.1/cinelerra/trackcanvas.h index 69318d67..cfa9a953 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.h +++ b/cinelerra-5.1/cinelerra/trackcanvas.h @@ -307,6 +307,7 @@ public: int do_tracks(int cursor_x, int cursor_y, int button_press); + int do_edit_popup(); int test_resources(int cursor_x, int cursor_y); int do_plugins(int cursor_x, int cursor_y,