灰度自定义色调曲线不能保存

This commit is contained in:
yangjiaxuan 2023-07-04 19:27:09 +08:00
parent 6cee54f1b0
commit ef7e0e2df7
1 changed files with 4 additions and 3 deletions

View File

@ -117,7 +117,6 @@ hg_settingdialog::hg_settingdialog(class Manager *mgr, SANE_Handle handle, const
m_closeButton = closeButtonNormal; m_closeButton = closeButtonNormal;
initUi(); initUi();
//on_current_scheme_changed();
HGChar cfgPath[512]; HGChar cfgPath[512];
GetConfigPath(cfgPath, 512); GetConfigPath(cfgPath, 512);
@ -138,6 +137,8 @@ hg_settingdialog::hg_settingdialog(class Manager *mgr, SANE_Handle handle, const
initGammaData(); initGammaData();
applyDeviceScheme(); applyDeviceScheme();
} }
else
on_current_scheme_changed();
connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed())); connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
} }
@ -2929,9 +2930,9 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
cur_cfg_->add_scheme(cur_scheme_, newCfgName.toStdString().c_str()); cur_cfg_->add_scheme(cur_scheme_, newCfgName.toStdString().c_str());
cur_cfg_->select_scheme(cur_scheme_->get_scheme_name().c_str()); cur_cfg_->select_scheme(cur_scheme_->get_scheme_name().c_str());
cur_cfg_->save(); cur_cfg_->save();
disconnect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed())); //disconnect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
comb_->setCurrentIndex(index); comb_->setCurrentIndex(index);
connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed())); //connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
changed_count_++; changed_count_++;
} }