Suppressing 2 Gtk warning: #1 when the lens profile's filename is empty; #2 when opening the Preferences window

This commit is contained in:
Hombre
2013-09-22 19:45:31 +02:00
parent 05a96423e4
commit 12807d3525
2 changed files with 4 additions and 3 deletions

View File

@@ -80,11 +80,13 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
{
disableListener ();
if (pp->lensProf.lcpFile.length()>0 && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) {
if (!pp->lensProf.lcpFile.empty() && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) {
fcbLCPFile->set_filename (pp->lensProf.lcpFile);
updateDisabled(true);
} else {
fcbLCPFile->unselect_filename(fcbLCPFile->get_filename());
Glib::ustring fname = fcbLCPFile->get_filename();
if (!pp->lensProf.lcpFile.empty())
fcbLCPFile->unselect_filename(fname);
updateDisabled(false);
}