From: Good Guy Date: Thu, 7 May 2020 00:28:06 +0000 (-0600) Subject: fix popup menu titlebar click, timebar updates scopewindow on btn-release, scopewindo... X-Git-Tag: 2020-05~9 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=4e08719d4410d49f07ed681bdaf4a52b9a49ea41;p=goodguy%2Fcinelerra.git fix popup menu titlebar click, timebar updates scopewindow on btn-release, scopewindow layout tweak --- diff --git a/cinelerra-5.1/cinelerra/scopewindow.C b/cinelerra-5.1/cinelerra/scopewindow.C index b3769673..6f34a155 100644 --- a/cinelerra-5.1/cinelerra/scopewindow.C +++ b/cinelerra-5.1/cinelerra/scopewindow.C @@ -1313,7 +1313,7 @@ int ScopeSettingOn::handle_event() } ScopeSettings::ScopeSettings(ScopeGUI *gui, int x, int y) - : BC_PopupMenu(x, y, xS(125), _("Settings")) + : BC_PopupMenu(x, y, xS(150), _("Settings")) { this->gui = gui; refresh_on = 0; diff --git a/cinelerra-5.1/cinelerra/timebar.C b/cinelerra-5.1/cinelerra/timebar.C index 79c99ed0..68f42b5a 100644 --- a/cinelerra-5.1/cinelerra/timebar.C +++ b/cinelerra-5.1/cinelerra/timebar.C @@ -849,21 +849,21 @@ int TimeBar::button_release_event() //printf("TimeBar::button_release_event %d %d\n", __LINE__, current_operation); int result = 0; int need_redraw = 0; - switch( current_operation ) - { - case TIMEBAR_DRAG: - mwindow->gui->get_focused_pane()->canvas->stop_dragscroll(); + switch( current_operation ) { + case TIMEBAR_DRAG: { + mwindow->gui->get_focused_pane()->canvas->stop_dragscroll(); + current_operation = TIMEBAR_NONE; + need_redraw = 1; + CWindowCanvas *canvas = mwindow->cwindow->gui->canvas; + canvas->draw_scope(canvas->refresh_frame, -1); + result = 1; + break; } + default: + if( current_operation != TIMEBAR_NONE ) { current_operation = TIMEBAR_NONE; - need_redraw = 1; result = 1; - break; - - default: - if( current_operation != TIMEBAR_NONE ) { - current_operation = TIMEBAR_NONE; - result = 1; - } - break; + } + break; } if( (!cursor_above() && highlighted) || need_redraw ) { diff --git a/cinelerra-5.1/guicast/bcmenuitem.C b/cinelerra-5.1/guicast/bcmenuitem.C index 7c8551f4..38c46b76 100644 --- a/cinelerra-5.1/guicast/bcmenuitem.C +++ b/cinelerra-5.1/guicast/bcmenuitem.C @@ -201,10 +201,10 @@ int BC_MenuItem::dispatch_button_press() int BC_MenuItem::dispatch_button_release(int &redraw) { - int result = 0; - - if(!strcmp(text, "-")) return 0; + int len = strlen(text); + if( len > 0 && text[0] == '-' && text[len-1] == '-' ) return 0; + int result = 0; if(submenu) { result = submenu->dispatch_button_release();