From d14146cc71feff11062316133fc6f47a542c2a30 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Fri, 11 Oct 2024 07:12:17 -0400 Subject: [PATCH] Remember last used file type filter from the load palette dialog. --- BinxelviewForm.cs | 3 +++ readme.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/BinxelviewForm.cs b/BinxelviewForm.cs index 3c5c3d1..28cd1d9 100644 --- a/BinxelviewForm.cs +++ b/BinxelviewForm.cs @@ -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; @@ -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(); diff --git a/readme.txt b/readme.txt index 91c569b..45b9700 100644 --- a/readme.txt +++ b/readme.txt @@ -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.