X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_sketch.cpp;h=32ab3d39e72090ebb62549788926dd806260e554;hb=30d736712404ceeff9971185a4355ac0328535f1;hp=ec6e8406404df09292bc8cbfe4116c495c26058e;hpb=837b63e9fb829d66d43f4f169861f8979f76820d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_sketch.cpp b/synfig-studio/trunk/src/gtkmm/state_sketch.cpp index ec6e840..32ab3d3 100644 --- a/synfig-studio/trunk/src/gtkmm/state_sketch.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_sketch.cpp @@ -190,7 +190,15 @@ void StateSketch_Context::clear_sketch() { get_work_area()->clear_persistant_strokes(); - get_canvas_view()->get_smach().process_event(EVENT_REFRESH); + + // if the sketch is currently shown, make sure it is updated + //! \todo is there a better way than this of getting Duckmatic to update its stroke_list_? + if (checkbutton_show_sketch.get_active()) + { + get_work_area()->set_show_persistant_strokes(false); + get_work_area()->set_show_persistant_strokes(true); + get_canvas_view()->get_smach().process_event(EVENT_REFRESH); + } } void @@ -199,7 +207,15 @@ StateSketch_Context::undo_stroke() if(!get_work_area()->persistant_stroke_list().empty()) { get_work_area()->persistant_stroke_list().pop_back(); - get_canvas_view()->get_smach().process_event(EVENT_REFRESH); + + // if the sketch is currently shown, make sure it is updated + //! \todo is there a better way than this of getting Duckmatic to update its stroke_list_? + if (checkbutton_show_sketch.get_active()) + { + get_work_area()->set_show_persistant_strokes(false); + get_work_area()->set_show_persistant_strokes(true); + get_canvas_view()->get_smach().process_event(EVENT_REFRESH); + } } }