Fix #3711 by using the method to clear a combo box which is correct in version 2 and 3 of Gtk+.
This commit is contained in:
@@ -1950,18 +1950,17 @@ void Preferences::bundledProfilesChanged ()
|
|||||||
|
|
||||||
void Preferences::iccDirChanged ()
|
void Preferences::iccDirChanged ()
|
||||||
{
|
{
|
||||||
const Glib::ustring currentSelection = monProfile->get_active_text ();
|
const auto currentSelection = monProfile->get_active_text ();
|
||||||
|
const auto profiles = rtengine::ICCStore::getInstance ()->getProfilesFromDir (iccDir->get_filename ());
|
||||||
|
|
||||||
monProfile->clear();
|
monProfile->remove_all();
|
||||||
|
|
||||||
monProfile->append_text (M("PREFERENCES_PROFILE_NONE"));
|
monProfile->append (M("PREFERENCES_PROFILE_NONE"));
|
||||||
monProfile->set_active (0);
|
|
||||||
|
|
||||||
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfilesFromDir (iccDir->get_filename ());
|
for (const auto& profile : profiles)
|
||||||
for (std::vector<Glib::ustring>::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile)
|
monProfile->append (profile);
|
||||||
monProfile->append_text (*profile);
|
|
||||||
|
|
||||||
monProfile->set_active_text (currentSelection);
|
setActiveTextOrIndex(*monProfile, currentSelection, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::storeCurrentValue()
|
void Preferences::storeCurrentValue()
|
||||||
|
Reference in New Issue
Block a user