fix popup menu titlebar click, timebar updates scopewindow on btn-release, scopewindo...
authorGood Guy <good1.2guy@gmail.com>
Thu, 7 May 2020 00:28:06 +0000 (18:28 -0600)
committerGood Guy <good1.2guy@gmail.com>
Thu, 7 May 2020 00:28:06 +0000 (18:28 -0600)
cinelerra-5.1/cinelerra/scopewindow.C
cinelerra-5.1/cinelerra/timebar.C
cinelerra-5.1/guicast/bcmenuitem.C

index b37696733f1c4d8d80b6b180c93a5ab21ec62fd8..6f34a1555e1267556aae30c98da7ea0d795f7def 100644 (file)
@@ -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;
index 79c99ed04ea2a37a61747b4722aea849ede87231..68f42b5a13eaf47fb5f71b0f04111b458b0f0768 100644 (file)
@@ -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 ) {
index 7c8551f4234036f42935ad332d462f2a9b423f60..38c46b76d87e6b72c7246e71b6e8613e61de9d19 100644 (file)
@@ -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();