X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fworkarea.cpp;h=e7c800d8f858e0c5c7015a752440d0a1211c226c;hb=37600b4b217caa5e316984ec0b035c5e8f9698af;hp=dce50cdd1ba55a45cdb4dc88f2f4859fcf1590b4;hpb=33bedf5ba9745b8da8ed629e9c1ea57313c87a82;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index dce50cd..e7c800d 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -7,6 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright 2006 Yue Shi Lai +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -634,7 +635,9 @@ WorkArea::WorkArea(etl::loose_handle canvas_interfac dragging(DRAG_NONE), show_grid(false), tile_w(128), - tile_h(128) + tile_h(128), + timecode_width(0), + timecode_height(0) { show_guides=true; curr_input_device=0; @@ -804,11 +807,7 @@ WorkArea::~WorkArea() // don't leave the render function queued if we are about to vanish; // that causes crashes if(render_idle_func_id) - { - synfig::info("g_source_remove() returns %d", g_source_remove(render_idle_func_id)); render_idle_func_id=0; - } else - synfig::info("no render_idle_func_id to clear\n"); } void @@ -2462,13 +2461,41 @@ WorkArea::queue_scroll() drawing_area->get_window()->scroll(-dx,-dy); - /*drawing_area->queue_draw_area( - 0, - 0, - 128, - 64 - ); - */ + if (timecode_width && timecode_height) + { + drawing_area->queue_draw_area(4, 4, 4+timecode_width, 4+timecode_height); + drawing_area->queue_draw_area(4-dx, 4-dy, 4-dx+timecode_width, 4-dy+timecode_height); + } + +#ifndef USE_FRAME_BACKGROUND_TO_SHOW_EDIT_MODE + if(canvas_interface->get_mode()&synfigapp::MODE_ANIMATE) + { + int maxx = drawing_area->get_width()-1; + int maxy = drawing_area->get_height()-1; + + if (dx > 0) + { + drawing_area->queue_draw_area( 0, 0, 1, maxy); + drawing_area->queue_draw_area(maxx-dx, 0, maxx-dx, maxy); + } + else if (dx < 0) + { + drawing_area->queue_draw_area( maxx, 0, maxx, maxy); + drawing_area->queue_draw_area( -dx, 0, -dx, maxy); + } + if (dy > 0) + { + drawing_area->queue_draw_area(0, 0, maxx, 1); + drawing_area->queue_draw_area(0, maxy-dy, maxx, maxy-dy); + } + else if (dy < 0) + { + drawing_area->queue_draw_area(0, maxy, maxx, maxy); + drawing_area->queue_draw_area(0, -dy, maxx, -dy); + } + } +#endif // USE_FRAME_BACKGROUND_TO_SHOW_EDIT_MODE + last_focus_point=focus_point; }