Commit aeec0f7f authored by Michael Natterer's avatar Michael Natterer 😴

app: small improvement to previous GimpPaletteEditor commit

parent ea27fd91
......@@ -771,17 +771,19 @@ palette_editor_entry_selected (GimpPaletteView *view,
GimpPaletteEditor *editor)
{
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
gchar *index = NULL;
if (editor->color != entry)
{
gchar index[8];
editor->color = entry;
if (entry)
index = g_strdup_printf("%04i", entry->position);
gtk_label_set_text (GTK_LABEL (editor->index_label),
entry ? index : "####");
g_free (index);
g_snprintf (index, sizeof (index), "%04i", entry->position);
else
g_snprintf (index, sizeof (index), "####");
gtk_label_set_text (GTK_LABEL (editor->index_label), index);
g_signal_handlers_block_by_func (editor->color_name,
palette_editor_color_name_changed,
......
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