Commit 9c957fa1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

added new function gimp_displays_invalidate() which queues a redraw on all

2003-02-21  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplay-foreach.[ch]: added new function
	gimp_displays_invalidate() which queues a redraw on all displays
	by calling gimp_display_shell_expose_full().

	* app/display/gimpdisplayshell-render.c (render_setup_notify):
	invalidate all displays when the transparency type or size changes.

	* app/tools/gimptexttool.c (text_tool_button_press): readded some
	code I accidentally removed in my last commit.

	* app/text/gimptextlayout.c (gimp_text_layout_new): always set the
	font size but make sure it is at least 1.
parent bee928eb
2003-02-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplay-foreach.[ch]: added new function
gimp_displays_invalidate() which queues a redraw on all displays
by calling gimp_display_shell_expose_full().
* app/display/gimpdisplayshell-render.c (render_setup_notify):
invalidate all displays when the transparency type or size changes.
* app/tools/gimptexttool.c (text_tool_button_press): readded some
code I accidentally removed in my last commit.
* app/text/gimptextlayout.c (gimp_text_layout_new): always set the
font size but make sure it is at least 1.
2003-02-21 Sven Neumann <sven@gimp.org>
 
* app/widgets/gimpviewabledialog.c: added missing cast.
......
......@@ -130,6 +130,24 @@ gimp_displays_flush (Gimp *gimp)
flushing = FALSE;
}
void
gimp_displays_invalidate (Gimp *gimp)
{
GList *list;
GimpDisplay *gdisp;
g_return_if_fail (GIMP_IS_GIMP (gimp));
for (list = GIMP_LIST (gimp->displays)->list;
list;
list = g_list_next (list))
{
gdisp = (GimpDisplay *) list->data;
gimp_display_shell_expose_full (GIMP_DISPLAY_SHELL (gdisp->shell));
}
}
/* Force all gdisplays to finish their idlerender projection */
void
gimp_displays_finish_draw (Gimp *gimp)
......
......@@ -26,6 +26,7 @@ GimpDisplay * gdisplays_check_valid (GimpDisplay *gdisp,
gboolean gimp_displays_dirty (Gimp *gimp);
void gimp_displays_delete (Gimp *gimp);
void gimp_displays_flush (Gimp *gimp);
void gimp_displays_invalidate (Gimp *gimp);
void gimp_displays_finish_draw (Gimp *gimp);
void gimp_displays_reconnect (Gimp *gimp,
GimpImage *old,
......
......@@ -35,6 +35,7 @@
#include "core/gimpimage-projection.h"
#include "gimpdisplay.h"
#include "gimpdisplay-foreach.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-filter.h"
#include "gimpdisplayshell-render.h"
......@@ -250,6 +251,8 @@ render_setup_notify (gpointer config,
render_empty_buf = NULL;
render_temp_buf = NULL;
}
gimp_displays_invalidate (gimp);
}
......
......@@ -173,8 +173,7 @@ gimp_text_layout_new (GimpText *text,
break;
}
if (size > 1)
pango_font_description_set_size (font_desc, size);
pango_font_description_set_size (font_desc, MAX (1, size));
context = gimp_image_get_pango_context (image);
......
......@@ -231,9 +231,10 @@ text_tool_button_press (GimpTool *tool,
}
}
gimp_text_tool_connect (GIMP_TEXT_TOOL (tool), text);
if (!text || text == text_tool->text)
text_tool_editor (text_tool);
text_tool_editor (text_tool);
gimp_text_tool_connect (GIMP_TEXT_TOOL (tool), text);
}
static void
......
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