From: Carlos Lopez Date: Sun, 28 Jun 2009 22:11:51 +0000 (+0200) Subject: Synchronise quality spin button and quality action radio buttons. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d299430eb47c770495cb84e0832073a25ea0268f;p=synfig.git Synchronise quality spin button and quality action radio buttons. Do not set insensitive the spin button when working depth is true. --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 0d1112b..87b4222 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1423,7 +1423,7 @@ CanvasView::init_menus() } action_group->add( action, sigc::bind( - sigc::mem_fun(*work_area, &studio::WorkArea::set_quality), + sigc::mem_fun(*this, &studio::CanvasView::set_quality), i ) ); @@ -3188,20 +3188,32 @@ void CanvasView::update_quality() { if(working_depth) - { - quality_spin->set_sensitive(false); return; - } - else - quality_spin->set_sensitive(true); if(updating_quality_) return; updating_quality_=true; work_area->set_quality((int) quality_spin->get_value()); + // Update Quality Radio actions + Glib::RefPtr action=Glib::RefPtr::cast_dynamic( + action_group->get_action(strprintf("quality-%02d",(int) quality_spin->get_value())) + ); + action->set_active(); + updating_quality_=false; } void +CanvasView::set_quality(int x) +{ + if(updating_quality_) + return; + work_area->set_quality(x); + // Update the quality spin button + quality_spin->set_value(x); +} + + +void CanvasView::on_dirty_preview() { if(!is_playing_) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index aa43bb8..2f26d7b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -437,6 +437,7 @@ private: void decrease_low_res_pixel_size(); void increase_low_res_pixel_size(); void toggle_low_res_pixel_flag(); + void set_quality(int x); /* -- ** -- P U B L I C M E T H O D S -----------------------------------------