projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidying.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
workarea.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/workarea.cpp
b/synfig-studio/trunk/src/gtkmm/workarea.cpp
index
65600c5
..
313646f
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/workarea.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/workarea.cpp
@@
-810,6
+810,19
@@
WorkArea::~WorkArea()
render_idle_func_id=0;
}
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()
{
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
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 bound
a
ry
/*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());
/*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);
}
modifier=Gdk::ModifierType(event->button.state);
}
- // Make sure we recogni
s
e the device
+ // Make sure we recogni
z
e the device
if(curr_input_device)
{
if(curr_input_device!=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 mouse scrolling events
else if(event->any.type==GDK_SCROLL)
{
- // GDK information needed to properly interpret
e
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.
// 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_();
signal_cursor_moved_();
- // Guide/Duck hilights on hover
+ // Guide/Duck hi
gh
lights on hover
if(dragging==DRAG_NONE)
{
GuideList::iterator iter;
if(dragging==DRAG_NONE)
{
GuideList::iterator iter;
@@
-2174,9
+2187,10
@@
public:
bool
studio::WorkArea::async_update_preview()
{
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;
}
return false;
}
@@
-2631,12
+2645,12
@@
studio::WorkArea::set_cursor(Gdk::CursorType x)
drawing_area->get_window()->set_cursor(Gdk::Cursor(x));
}
drawing_area->get_window()->set_cursor(Gdk::Cursor(x));
}
-#include "iconcontroler.h"
+#include "iconcontrol
l
er.h"
void
studio::WorkArea::refresh_cursor()
{
void
studio::WorkArea::refresh_cursor()
{
-// set_cursor(IconControler::get_tool_cursor(canvas_view->get_smach().get_state_name(),drawing_area->get_window()));
+// set_cursor(IconControl
l
er::get_tool_cursor(canvas_view->get_smach().get_state_name(),drawing_area->get_window()));
}
void
}
void