projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use Color::is_straight(). Also, re-enable the optimization for straight blending...
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
dock_navigator.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/dock_navigator.cpp
b/synfig-studio/trunk/src/gtkmm/dock_navigator.cpp
index
a8ca5c7
..
7141fa9
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/dock_navigator.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/dock_navigator.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** 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
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-43,6
+44,8
@@
#include "asyncrenderer.h"
#include "asyncrenderer.h"
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
#endif
/* === U S I N G =========================================================== */
@@
-166,8
+169,8
@@
void studio::Widget_NavView::on_start_render()
renderer = new AsyncRenderer(targ);
renderer->signal_success().connect(sigc::mem_fun(*this,&Widget_NavView::on_finish_render));
renderer = new AsyncRenderer(targ);
renderer->signal_success().connect(sigc::mem_fun(*this,&Widget_NavView::on_finish_render));
- renderer->start();
dirty = false;
dirty = false;
+ renderer->start();
}
}
}
}
@@
-179,7
+182,6
@@
void studio::Widget_NavView::on_finish_render()
//synfig::warning("Nav: It hath succeeded!!!");
//assert(renderer && renderer->has_success());
//synfig::warning("Nav: It hath succeeded!!!");
//assert(renderer && renderer->has_success());
- DEBUGPOINT();
//synfig::warning("Nav: now we know it really succeeded");
if(!*surface)
{
//synfig::warning("Nav: now we know it really succeeded");
if(!*surface)
{
@@
-219,7
+221,7
@@
void studio::Widget_NavView::on_finish_render()
dw, // width
dh, // height
dw*synfig::channels(pf), // stride (pitch)
dw, // width
dh, // height
dw*synfig::channels(pf), // stride (pitch)
-
SigC::slot
(freegu8)
+
sigc::ptr_fun
(freegu8)
);
}
else
);
}
else
@@
-255,8
+257,13
@@
static double zoom_to_unit(double f)
}else return -999999.0;
}
}else return -999999.0;
}
-bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *
exp
)
+bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *
/*exp*/
)
{
{
+ // don't redraw if the previous redraw is still running single-threaded
+ // or we end up destroying the renderer that's rendering it
+ if (App::single_threaded && renderer && renderer->updating)
+ return false;
+
//print out the zoom
//HACK kind of...
//zoom_print.set_text(strprintf("%.1f%%",100*unit_to_zoom(adj_zoom.get_value())));
//print out the zoom
//HACK kind of...
//zoom_print.set_text(strprintf("%.1f%%",100*unit_to_zoom(adj_zoom.get_value())));
@@
-462,7
+469,7
@@
bool studio::Widget_NavView::on_mouse_event(GdkEvent * e)
float max = abs((br[0]-tl[0]) / drawto.get_width());
float max = abs((br[0]-tl[0]) / drawto.get_width());
- if((
prev->get_width() / drawto.get_width()) < (prev->get_height(
) / drawto.get_height()))
+ if((
float(prev->get_width()) / drawto.get_width()) < (float(prev->get_height()
) / drawto.get_height()))
max = abs((br[1]-tl[1]) / drawto.get_height());
float signx = (br[0]-tl[0]) < 0 ? -1 : 1;
max = abs((br[1]-tl[1]) / drawto.get_height());
float signx = (br[0]-tl[0]) < 0 ? -1 : 1;