fixes for selection and popup behaviors
authorGood Guy <[email protected]>
Wed, 31 Aug 2016 17:29:37 +0000 (11:29 -0600)
committerGood Guy <[email protected]>
Wed, 31 Aug 2016 17:29:37 +0000 (11:29 -0600)
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/mwindowmove.C
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/trackcanvas.h

index 6e72494ace07c5326e7a64e5d600cb86e044753f..157090efbeaa0fc95c49779ed2a1c8573e7090ef 100644 (file)
@@ -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(
index 62460c516c58c99cae12444aca599d46cc0722bb..cffc71df0ea33bcda33bc7d5e57999726bd766fe 100644 (file)
@@ -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();
index 661f473b53bd619f705701f50dc5a72272c2c646..1c2c50fc6d36bc8f4fefaa4ae64f7efb839c90c3 100644 (file)
@@ -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;
 }
index 69318d67e58db9d05dca00d7588979252f66b26f..cfa9a9539501d81be4160e0716e8c5b42ff55fa2 100644 (file)
@@ -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,