add refresh_only to scopewindow, fix alsa prefs for capture source, add python to...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / scopewindow.C
index 9e05c15a4be6b5c827342778215f427a5d191b0a..283564bc6c4915a9a95320c7082dc820df8e565a 100644 (file)
@@ -453,6 +453,7 @@ void ScopeGUI::reset()
        data_frame = 0;
        frame_w = 1;
        use_smooth = 1;
+       use_refresh = 0;
        use_wave_gain = 5;
        use_vect_gain = 5;
        use_hist = 0;
@@ -493,7 +494,10 @@ void ScopeGUI::create_objects()
        scope_menu->create_objects();
        int x1 = x + scope_menu->get_w() + 2*margin;
        add_subwindow(smooth = new ScopeSmooth(this, x1, y));
-
+       if( use_refresh >= 0 ) {
+               y += smooth->get_h() + margin;
+               add_subwindow(refresh = new ScopeRefresh(this, x, y));
+       }
        create_panels();
        update_toggles();
        show_window();
@@ -1442,3 +1446,16 @@ int ScopeSmooth::handle_event()
        return 1;
 }
 
+ScopeRefresh::ScopeRefresh(ScopeGUI *gui, int x, int y)
+ : BC_CheckBox(x, y, gui->use_refresh, _("Refresh only"))
+{
+       this->gui = gui;
+}
+
+int ScopeRefresh::handle_event()
+{
+       gui->use_refresh = get_value();
+       gui->toggle_event();
+       return 1;
+}
+