Commit 13dd65ae authored by EDT 1998 Matthew Wilson's avatar EDT 1998 Matthew Wilson Committed by Matt Wilson

restart current tool when changing gdisplays

Wed Apr 15 13:18:47 EDT 1998 Matthew Wilson <msw@gimp.org>

	* app/disp_callbacks.c: restart current tool when changing
	gdisplays

--Matt
parent 41d17fb4
Wed Apr 15 13:18:47 EDT 1998 Matthew Wilson <msw@gimp.org>
* app/disp_callbacks.c: restart current tool when changing
gdisplays
Wed Apr 15 17:40:55 MEST 1998 Sven Neumann <sven@gimp.org>
* app/iscissors.c: changed toggle_buttons to check_buttons since
......
......@@ -66,7 +66,7 @@ gint
gdisplay_canvas_events (GtkWidget *canvas,
GdkEvent *event)
{
GDisplay *gdisp;
GDisplay *gdisp, *tool_gdisp;
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
......@@ -153,14 +153,19 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
/* Reset the current tool if we're changing drawables... */
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve) {
/* reset the current tool if we're changing gdisplays */
if (active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (tool_gdisp->ID != gdisp->ID)
tools_initialize (active_tool->type, gdisp);
}
/* Reset the current tool if we're changing drawables... */
} else
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve)
tools_initialize (active_tool->type, gdisp);
} else
active_tool->drawable = gimage_active_drawable(gdisp->gimage);
......
......@@ -66,7 +66,7 @@ gint
gdisplay_canvas_events (GtkWidget *canvas,
GdkEvent *event)
{
GDisplay *gdisp;
GDisplay *gdisp, *tool_gdisp;
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
......@@ -153,14 +153,19 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
/* Reset the current tool if we're changing drawables... */
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve) {
/* reset the current tool if we're changing gdisplays */
if (active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (tool_gdisp->ID != gdisp->ID)
tools_initialize (active_tool->type, gdisp);
}
/* Reset the current tool if we're changing drawables... */
} else
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve)
tools_initialize (active_tool->type, gdisp);
} else
active_tool->drawable = gimage_active_drawable(gdisp->gimage);
......
......@@ -66,7 +66,7 @@ gint
gdisplay_canvas_events (GtkWidget *canvas,
GdkEvent *event)
{
GDisplay *gdisp;
GDisplay *gdisp, *tool_gdisp;
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
......@@ -153,14 +153,19 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
/* Reset the current tool if we're changing drawables... */
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve) {
/* reset the current tool if we're changing gdisplays */
if (active_tool->gdisp_ptr) {
tool_gdisp = active_tool->gdisp_ptr;
if (tool_gdisp->ID != gdisp->ID)
tools_initialize (active_tool->type, gdisp);
}
/* Reset the current tool if we're changing drawables... */
} else
if (active_tool->drawable) {
if ((drawable_ID(gimage_active_drawable(gdisp->gimage)) !=
drawable_ID(GIMP_DRAWABLE(active_tool->drawable))) &&
!active_tool->preserve)
tools_initialize (active_tool->type, gdisp);
} else
active_tool->drawable = gimage_active_drawable(gdisp->gimage);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment