diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-22 13:44:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-22 13:44:30 +0000 |
| commit | a8e30a77bdd434ea2cdd81407f4ea75664fdce93 (patch) | |
| tree | fb088bb1105da6822df8a8e66d4b9b23cbc0cb2c /src/wx/content_colour_conversion_dialog.cc | |
| parent | e885dd4272448b7bf0e54d9b149f54b53bede229 (diff) | |
Another attempt to fix glitches in the colour conversion dialog
on OS X.
Reported-by: Adam Colt
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); } |
