improve delays created by vicon drawing locks, reset_cache segv fix, gang track toolt...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindowgui.C
index a9e93c6419a18f5a3f061358ee6ec94bcd195598..9c3dc9d8fa0b5df2798f9bcbbe648ad7d0cbc1cb 100644 (file)
@@ -159,7 +159,7 @@ void MWindowGUI::create_objects()
        lock_window("MWindowGUI::create_objects");
        const int debug = 0;
 
-       resource_thread = new ResourceThread(mwindow, this);
+       resource_thread = new ResourceThread(mwindow);
        resource_thread->create_objects();
 
 
@@ -316,7 +316,7 @@ int MWindowGUI::resize_event(int w, int h)
 //printf("MWindowGUI::resize_event %d\n", __LINE__);
        mwindow->session->mwindow_w = w;
        mwindow->session->mwindow_h = h;
-       int x1 = get_w() - MainShBtns::calculate_w(-1, 0, -1) - xS(5);
+       int x1 = w - MainShBtns::calculate_w(-1, 0, -1) - xS(5);
        mainshbtns->reposition_window(x1, -1);
        int x2 = x1 - mwindow->theme->stack_button_w - xS(5);
        stack_button->reposition_window(x2, stack_button->get_y());
@@ -1256,18 +1256,18 @@ int MWindowGUI::keypress_event()
                        if( (this_track = pane[i]->over_patchbay()) != 0 ) break;
                }
 
-               if( get_keypress() == TAB ) { // Switch the record button
+               if( get_keypress() == TAB ) { // Switch the armed button
                        if( this_track )
-                               this_track->record = !this_track->record ? 1 : 0;
+                               this_track->armed = !this_track->armed ? 1 : 0;
                }
                else {
                        int total_selected = mwindow->edl->tracks->total_of(Tracks::RECORD);
                        // all selected if nothing previously selected or
                        // if this patch was previously the only one selected and armed
                        int selected = !total_selected || (total_selected == 1 &&
-                               this_track && this_track->record ) ? 1 : 0;
+                               this_track && this_track->armed ) ? 1 : 0;
                        mwindow->edl->tracks->select_all(Tracks::RECORD, selected);
-                       if( !selected && this_track ) this_track->record = 1;
+                       if( !selected && this_track ) this_track->armed = 1;
                }
 
                update(0, NORMAL_DRAW, 0, 0, 1, 0, 1);
@@ -1809,6 +1809,7 @@ void MWindowGUI::delete_y_pane(int cursor_y)
 
 void MWindowGUI::stop_pane_drag()
 {
+       if( !dragging_pane ) return;
        dragging_pane = 0;
        resource_thread->stop_draw(0);