void
CanvasOptions::on_apply_pressed()
{
+ canvas_view_->set_grid_snap_toggle(toggle_grid_snap.get_active());
if(toggle_grid_snap.get_active())
canvas_view_->work_area->enable_grid_snap();
else
canvas_view_->work_area->disable_grid_snap();
+ canvas_view_->set_grid_show_toggle(toggle_grid_show.get_active());
if(toggle_grid_show.get_active())
canvas_view_->work_area->enable_grid();
else
{
Glib::RefPtr<Gtk::ToggleAction> action;
- action = Gtk::ToggleAction::create("toggle-grid-show", _("Show Grid"));
- action->set_active(work_area->grid_status());
- action_group->add(action, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid));
+ grid_show_toggle = Gtk::ToggleAction::create("toggle-grid-show", _("Show Grid"));
+ grid_show_toggle->set_active(work_area->grid_status());
+ action_group->add(grid_show_toggle, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid));
- action = Gtk::ToggleAction::create("toggle-grid-snap", _("Snap to Grid"));
- action->set_active(work_area->get_grid_snap());
- action_group->add(action, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid_snap));
+ grid_snap_toggle = Gtk::ToggleAction::create("toggle-grid-snap", _("Snap to Grid"));
+ grid_snap_toggle->set_active(work_area->get_grid_snap());
+ action_group->add(grid_snap_toggle, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid_snap));
action = Gtk::ToggleAction::create("toggle-guide-show", _("Show Guides"));
action->set_active(work_area->get_show_guides());
typedef synfigapp::CanvasInterface::Mode Mode;
+ void set_grid_snap_toggle(bool flag) { grid_snap_toggle->set_active(flag); }
+ void set_grid_show_toggle(bool flag) { grid_show_toggle->set_active(flag); }
+
/*
-- ** -- P R I V A T E D A T A ---------------------------------------------
*/
*/
Gtk::Menu parammenu;
+ Glib::RefPtr<Gtk::ToggleAction> grid_snap_toggle;
+ Glib::RefPtr<Gtk::ToggleAction> grid_show_toggle;
+
Gtk::RadioButtonGroup quality_group;
Gtk::RadioButtonGroup low_res_pixel_size_group;