summaryrefslogtreecommitdiffstats
path: root/Drawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Drawer.cpp')
-rw-r--r--Drawer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Drawer.cpp b/Drawer.cpp
index 147103a..abe8e20 100644
--- a/Drawer.cpp
+++ b/Drawer.cpp
@@ -49,7 +49,7 @@ gboolean Drawer::eventHandler(GtkWidget *widget, GdkEvent *event, Drawer *drawer
return TRUE;
case GDK_BUTTON_PRESS:
- drawer->window->getEditManager().buttonPress(event->button.button);
+ drawer->window->getActiveTool()->getEventHandler()->buttonPress(event->button.button);
return TRUE;
case GDK_SCROLL:
@@ -168,6 +168,9 @@ void Drawer::render() {
renderer.render(window->getLevel(), rect, scale);
+ if(window->getActiveTool()->getRenderer())
+ window->getActiveTool()->getRenderer()->render(window->getLevel(), rect, scale);
+
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
@@ -175,9 +178,7 @@ void Drawer::render() {
gdk_gl_drawable_gl_end(drawable);
}
-Drawer::Drawer(Window *window, GdkGLConfig *glconfig)
- : renderer(&window->getEditManager())
-{
+Drawer::Drawer(Window *window, GdkGLConfig *glconfig) : renderer(&window->getEditManager()) {
this->window = window;
zoomExp = 0;
scale = 100;