Typo: 'hilight' -> 'highlight'.
[synfig.git] / synfig-studio / trunk / src / gtkmm / workarea.cpp
index 65600c5..313646f 100644 (file)
@@ -810,6 +810,19 @@ WorkArea::~WorkArea()
                render_idle_func_id=0;
 }
 
+bool
+WorkArea::get_updating()const
+{
+       return App::single_threaded && async_renderer && async_renderer->updating;
+}
+
+void
+WorkArea::stop_updating(bool cancel)
+{
+       async_renderer->stop();
+       if (cancel) canceled_=true;
+}
+
 void
 WorkArea::save_meta_data()
 {
@@ -1048,7 +1061,7 @@ void
 WorkArea::set_focus_point(const synfig::Point &point)
 {
        // These next three lines try to ensure that we place the
-       // focus on a pixel boundry
+       // focus on a pixel boundary
        /*Point adjusted(point[0]/abs(get_pw()),point[1]/abs(get_ph()));
        adjusted[0]=(abs(adjusted[0]-floor(adjusted[0]))<0.5)?floor(adjusted[0])*abs(get_pw()):ceil(adjusted[0])*abs(get_ph());
        adjusted[1]=(abs(adjusted[1]-floor(adjusted[1]))<0.5)?floor(adjusted[1])*abs(get_ph()):ceil(adjusted[1])*abs(get_ph());
@@ -1189,7 +1202,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        modifier=Gdk::ModifierType(event->button.state);
                }
 
-               // Make sure we recognise the device
+               // Make sure we recognize the device
                if(curr_input_device)
                {
                        if(curr_input_device!=device)
@@ -1255,7 +1268,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
        // GDK mouse scrolling events
        else if(event->any.type==GDK_SCROLL)
        {
-               // GDK information needed to properly interprete mouse
+               // GDK information needed to properly interpret mouse
                // scrolling events are: scroll.state, scroll.x/scroll.y, and
                // scroll.direction. The value of scroll.direction will be
                // obtained later.
@@ -1482,7 +1495,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
 
                signal_cursor_moved_();
 
-               // Guide/Duck hilights on hover
+               // Guide/Duck highlights on hover
                if(dragging==DRAG_NONE)
                {
                        GuideList::iterator iter;
@@ -2174,9 +2187,10 @@ public:
 bool
 studio::WorkArea::async_update_preview()
 {
-       if (async_renderer && async_renderer->updating == true)
+       if (get_updating())
        {
-               async_renderer->stop();
+               stop_updating();
+               queue_render_preview();
                return false;
        }
 
@@ -2631,12 +2645,12 @@ studio::WorkArea::set_cursor(Gdk::CursorType x)
        drawing_area->get_window()->set_cursor(Gdk::Cursor(x));
 }
 
-#include "iconcontroler.h"
+#include "iconcontroller.h"
 
 void
 studio::WorkArea::refresh_cursor()
 {
-//     set_cursor(IconControler::get_tool_cursor(canvas_view->get_smach().get_state_name(),drawing_area->get_window()));
+//     set_cursor(IconController::get_tool_cursor(canvas_view->get_smach().get_state_name(),drawing_area->get_window()));
 }
 
 void