Modified logic to selected the default sort criteria in palette editor.

This commit is contained in:
David Capello 2010-06-15 19:45:57 -03:00
parent 512a6162fe
commit 6fb63f71b0
2 changed files with 5 additions and 4 deletions

View File

@ -76,7 +76,7 @@
<listitem text="RGB Blue" />
<listitem text="HSV Hue" />
<listitem text="HSV Saturation" />
<listitem text="HSV Value" />
<listitem text="HSV Value" selected="true" />
</listbox>
</view>
<separator text="Direction:" left="true" horizontal="true" />

View File

@ -444,9 +444,10 @@ static void sort_command(JWidget widget)
HOOK(data.insert_criteria, JI_SIGNAL_BUTTON_SELECT, insert_criteria_hook, &data);
HOOK(data.remove_criteria, JI_SIGNAL_BUTTON_SELECT, remove_criteria_hook, &data);
// Select "Value" and insert it as default selected criteria
jlistbox_select_index(data.available_criteria, 5);
insert_criteria_hook(data.insert_criteria, (void*)&data);
// If there is a selected <listitem> in available criteria
// <listbox>, insert it as default criteria to sort colors
if (jlistbox_get_selected_child(data.available_criteria))
insert_criteria_hook(data.insert_criteria, (void*)&data);
// Open the window
dlg->open_window_fg();