Show pixel filter name not number on cycle

Save the wxChoice* for the pixel filter name selection list in the XRC
and use it to display the filter name in the status message on pixel
filter cycle instead of the filter number.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-08-18 13:52:13 +00:00
parent a3b2a35395
commit 639003a8b6
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
3 changed files with 7 additions and 1 deletions

View File

@ -2766,7 +2766,7 @@ EVT_HANDLER_MASK(ChangeFilter, "Change Pixel Filter", CMDEN_NREC_ANY)
}
wxString msg;
msg.Printf(_("Using pixel filter #%d"), gopts.filter);
msg.Printf(_("Using pixel filter %s"), pixel_filters->GetString(gopts.filter));
systemScreenMessage(msg);
}

View File

@ -3701,6 +3701,10 @@ bool MainFrame::BindControls()
rb->Hide();
#endif
ch = GetValidatedChild<wxChoice, wxGenericValidator>(d, "Filter", wxGenericValidator(&gopts.filter));
// Save the Filters choice control to extract the names from the XRC.
pixel_filters = ch;
// these two are filled and/or hidden at dialog load time
wxControl* pll;
wxChoice* pl;

View File

@ -382,6 +382,8 @@ private:
// Load a named wxDialog from the XRC file
wxDialog* LoadXRCropertySheetDialog(const char* name);
wxChoice* pixel_filters = nullptr;
#include "cmdhandlers.h"
};