}
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;
//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 ) {
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();