X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindow.C;h=4179cc51dfad48f3492d1beabd3f8b5c54700b3f;hb=b384d47608e07b9f5b6ce5fe1d0d76d9bda38202;hp=8319bfbdead591e94afdb0a1e3ae7f79c87b36d2;hpb=22c6251d37911a11e322bf7518e6a992ea0bb6c7;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 8319bfbd..4179cc51 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -303,7 +303,7 @@ MWindow::~MWindow() gui->del_keyboard_listener( (int (BC_WindowBase::*)(BC_WindowBase *)) &MWindowGUI::keyboard_listener); - reset_caches(); + reset_caches(0); #if 0 // release the hounds if( awindow && awindow->gui ) awindow->gui->close(0); @@ -1524,7 +1524,8 @@ void MWindow::tile_mixers() void MWindow::set_gang_tracks(int v) { - edl->session->gang_tracks = v; + edl->local_session->gang_tracks = v; + sync_parameters(CHANGE_PARAMS); gui->update(1, 1, 0, 0, 1, 0, 0); gui->flush(); } @@ -2919,7 +2920,7 @@ void MWindow::run() run_lock->unlock(); } -void MWindow::show_vwindow() +void MWindow::show_vwindow(int raise) { int total_running = 0; session->show_vwindow = 1; @@ -2929,19 +2930,17 @@ void MWindow::show_vwindow() for(int j = 0; j < vwindows.size(); j++) { VWindow *vwindow = vwindows[j]; if( !vwindow->is_running() ) continue; + total_running++; + if( !raise && !vwindow->gui->is_hidden() ) continue; vwindow->gui->lock_window("MWindow::show_vwindow"); vwindow->gui->show_window(0); vwindow->gui->raise_window(); vwindow->gui->flush(); vwindow->gui->unlock_window(); - total_running++; } - // If no windows visible - if(!total_running) - { + if( !total_running ) get_viewer(1, DEFAULT_VWINDOW); - } gui->mainmenu->show_vwindow->set_checked(1); } @@ -3016,8 +3015,8 @@ void MWindow::restore_windows() vwindow->gui->unlock_window(); } } - else - show_vwindow(); + else + show_vwindow(0); if( !session->show_awindow && !awindow->gui->is_hidden() ) { awindow->gui->lock_window("MWindow::restore_windows"); @@ -4089,18 +4088,18 @@ void MWindow::update_preferences(Preferences *prefs) if( prefs != preferences ) preferences->copy_from(prefs); if( cwindow->playback_engine ) - cwindow->playback_engine->preferences->copy_from(prefs); + cwindow->playback_engine->update_preferences(prefs); for(int i = 0; i < vwindows.size(); i++) { VWindow *vwindow = vwindows[i]; if( !vwindow->is_running() ) continue; if( vwindow->playback_engine ) - vwindow->playback_engine->preferences->copy_from(prefs); + vwindow->playback_engine->update_preferences(prefs); } for(int i = 0; i < zwindows.size(); i++) { ZWindow *zwindow = zwindows[i]; if( !zwindow->is_running() ) continue; if( zwindow->zgui->playback_engine ) - zwindow->zgui->playback_engine->preferences->copy_from(prefs); + zwindow->zgui->playback_engine->update_preferences(prefs); } } @@ -4475,9 +4474,8 @@ int MWindow::create_aspect_ratio(float &w, float &h, int width, int height) return 0; } -void MWindow::reset_caches() +void MWindow::reset_caches(int locked) { - int locked = gui->get_window_lock(); if( locked ) gui->unlock_window(); awindow->gui->stop_vicon_drawing(1); if( cwindow->playback_engine )