diff options
Diffstat (limited to 'src/wx/content_colour_conversion_dialog.cc')
| -rw-r--r-- | src/wx/content_colour_conversion_dialog.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wx/content_colour_conversion_dialog.cc b/src/wx/content_colour_conversion_dialog.cc index d8e768bcd..3fa8e120a 100644 --- a/src/wx/content_colour_conversion_dialog.cc +++ b/src/wx/content_colour_conversion_dialog.cc @@ -20,6 +20,7 @@ #include <wx/statline.h> #include "lib/colour_conversion.h" #include "lib/config.h" +#include "lib/util.h" #include "wx_util.h" #include "content_colour_conversion_dialog.h" #include "colour_conversion_editor.h" @@ -78,7 +79,7 @@ ContentColourConversionDialog::set (ColourConversion c) _setting = true; _editor->set (c); _setting = false; - + check_for_preset (); } @@ -93,7 +94,11 @@ ContentColourConversionDialog::check_for_preset () _preset_check->SetValue (preset); _preset_choice->Enable (preset); - _preset_choice->SetSelection (preset.get_value_or (-1)); + if (preset) { + _preset_choice->SetSelection (preset.get ()); + } else { + _preset_choice->SetSelection (-1); + } } void @@ -112,7 +117,7 @@ void ContentColourConversionDialog::preset_choice_changed () { vector<PresetColourConversion> presets = Config::instance()->colour_conversions (); - int const s = _preset_choice->GetSelection(); + int const s = _preset_choice->GetCurrentSelection(); if (s != -1) { set (presets[s].conversion); } |
