Commit 49424610 authored by Jay Cox's avatar Jay Cox Committed by jaycox
Browse files

These files should have been commited in my 2000-05-08 commit but somehow


2000-06-13  Jay Cox  <jaycox@gimp.org>

        These files should have been commited in my 2000-05-08 commit
	but somehow they didnt make it.

	* app/hue_saturation.c
	* app/levels.c
	* app/posterize.c
	* app/threshold.c: Add a call to image_map_clear in the
	preview toggle button callback.  This makes the preview toggle
	button behave as expected.

	* app/histogram_tool: remove an unnecessary include.
parent 86f10eb6
This diff is collapsed.
......@@ -743,7 +743,16 @@ hue_saturation_preview_update (GtkWidget *widget,
hue_saturation_preview (hsd);
}
else
hsd->preview = FALSE;
{
hsd->preview = FALSE;
if (hsd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (hsd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -477,7 +477,16 @@ threshold_preview_update (GtkWidget *widget,
threshold_preview (td);
}
else
td->preview = FALSE;
{
td->preview = FALSE;
if (td->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (td->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -22,7 +22,6 @@
#include "gdisplay.h"
#include "gimpui.h"
#include "histogram_tool.h"
#include "image_map.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
......
......@@ -743,7 +743,16 @@ hue_saturation_preview_update (GtkWidget *widget,
hue_saturation_preview (hsd);
}
else
hsd->preview = FALSE;
{
hsd->preview = FALSE;
if (hsd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (hsd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -94,6 +94,7 @@ struct _LevelsDialog
GimpHistogram *hist;
GimpDrawable *drawable;
ImageMap image_map;
gint color;
......@@ -851,10 +852,11 @@ levels_preview (LevelsDialog *ld)
{
if (!ld->image_map)
{
g_warning ("No image map");
g_warning ("levels_preview: No Image Map");
return;
}
if (!ld->preview)
return;
active_tool->preserve = TRUE;
image_map_apply (ld->image_map, (ImageMapApplyFunc) gimp_lut_process_2,
(void *) ld->lut);
......@@ -1080,7 +1082,17 @@ levels_preview_update (GtkWidget *widget,
levels_preview (ld);
}
else
ld->preview = FALSE;
{
ld->preview = FALSE;
if (ld->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (ld->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -350,7 +350,16 @@ posterize_preview_update (GtkWidget *widget,
posterize_preview (pd);
}
else
pd->preview = FALSE;
{
pd->preview = FALSE;
if (pd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (pd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -477,7 +477,16 @@ threshold_preview_update (GtkWidget *widget,
threshold_preview (td);
}
else
td->preview = FALSE;
{
td->preview = FALSE;
if (td->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (td->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -22,7 +22,6 @@
#include "gdisplay.h"
#include "gimpui.h"
#include "histogram_tool.h"
#include "image_map.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
......
......@@ -743,7 +743,16 @@ hue_saturation_preview_update (GtkWidget *widget,
hue_saturation_preview (hsd);
}
else
hsd->preview = FALSE;
{
hsd->preview = FALSE;
if (hsd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (hsd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -94,6 +94,7 @@ struct _LevelsDialog
GimpHistogram *hist;
GimpDrawable *drawable;
ImageMap image_map;
gint color;
......@@ -851,10 +852,11 @@ levels_preview (LevelsDialog *ld)
{
if (!ld->image_map)
{
g_warning ("No image map");
g_warning ("levels_preview: No Image Map");
return;
}
if (!ld->preview)
return;
active_tool->preserve = TRUE;
image_map_apply (ld->image_map, (ImageMapApplyFunc) gimp_lut_process_2,
(void *) ld->lut);
......@@ -1080,7 +1082,17 @@ levels_preview_update (GtkWidget *widget,
levels_preview (ld);
}
else
ld->preview = FALSE;
{
ld->preview = FALSE;
if (ld->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (ld->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -350,7 +350,16 @@ posterize_preview_update (GtkWidget *widget,
posterize_preview (pd);
}
else
pd->preview = FALSE;
{
pd->preview = FALSE;
if (pd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (pd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -477,7 +477,16 @@ threshold_preview_update (GtkWidget *widget,
threshold_preview (td);
}
else
td->preview = FALSE;
{
td->preview = FALSE;
if (td->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (td->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -22,7 +22,6 @@
#include "gdisplay.h"
#include "gimpui.h"
#include "histogram_tool.h"
#include "image_map.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
......
......@@ -743,7 +743,16 @@ hue_saturation_preview_update (GtkWidget *widget,
hue_saturation_preview (hsd);
}
else
hsd->preview = FALSE;
{
hsd->preview = FALSE;
if (hsd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (hsd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -94,6 +94,7 @@ struct _LevelsDialog
GimpHistogram *hist;
GimpDrawable *drawable;
ImageMap image_map;
gint color;
......@@ -851,10 +852,11 @@ levels_preview (LevelsDialog *ld)
{
if (!ld->image_map)
{
g_warning ("No image map");
g_warning ("levels_preview: No Image Map");
return;
}
if (!ld->preview)
return;
active_tool->preserve = TRUE;
image_map_apply (ld->image_map, (ImageMapApplyFunc) gimp_lut_process_2,
(void *) ld->lut);
......@@ -1080,7 +1082,17 @@ levels_preview_update (GtkWidget *widget,
levels_preview (ld);
}
else
ld->preview = FALSE;
{
ld->preview = FALSE;
if (ld->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (ld->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -350,7 +350,16 @@ posterize_preview_update (GtkWidget *widget,
posterize_preview (pd);
}
else
pd->preview = FALSE;
{
pd->preview = FALSE;
if (pd->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (pd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
static void
......
......@@ -477,7 +477,16 @@ threshold_preview_update (GtkWidget *widget,
threshold_preview (td);
}
else
td->preview = FALSE;
{
td->preview = FALSE;
if (td->image_map)
{
active_tool->preserve = TRUE;
image_map_clear (td->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
}
}
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