Skip to content

Commit

Permalink
Remember last used file type filter from the load palette dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbradsmith committed Oct 11, 2024
1 parent e97b4c2 commit d14146c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BinxelviewForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum PaletteMode
int next_increment_bit = 0;
int selected_tile = -1;
long selected_pos = -1;
int selected_palette_filter = 0;

Preset preset;
Preset default_preset;
Expand Down Expand Up @@ -1684,8 +1685,10 @@ private void buttonLoadPal_Click(object sender, EventArgs e)
"Image (*.bmp;*.gif;*.png;*.tif)|*.bmp;*.gif;*.png;*.tif|" +
"VGA Palette, 6-bit RGB18 (*.vga;*.*)|*.vga;*.*|"+
"All files, RGB24 (*.*)|*.*";
d.FilterIndex = selected_palette_filter;
if (d.ShowDialog() == DialogResult.OK)
{
selected_palette_filter = d.FilterIndex; // remember last used filter
if (loadPalette(d.FileName,d.FilterIndex==2,d.FilterIndex==3))
{
refreshPalette();
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ Changes
- Command line arguments for options.
- Default palette ability.
- Fix image loaded as palette not releasing file handle.
- Remember last used file type filter from the load palette dialog.

1.5.0.0 (2020-07-31)
- Twiddle option for inspecting textures stored with morton ordering of pixels.
Expand Down

0 comments on commit d14146c

Please sign in to comment.