新增配置索引默认新增到最后一个
This commit is contained in:
parent
497f248c43
commit
6cee54f1b0
|
@ -2896,6 +2896,7 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
|
|||
{
|
||||
int id = 0;
|
||||
QString text(find_current_scheme_menu(&id));
|
||||
int index = comb_->count();
|
||||
if(!text.isEmpty() && id >= 0)
|
||||
{
|
||||
Dialog_Input dlg(this);
|
||||
|
@ -2915,7 +2916,7 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
|
|||
}
|
||||
|
||||
disconnect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
|
||||
comb_->insertItem(id + 1, newCfgName);
|
||||
comb_->insertItem(index, newCfgName);
|
||||
connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
|
||||
|
||||
gb::sane_config_schm *scheme = cur_scheme_->copy();
|
||||
|
@ -2929,7 +2930,7 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
|
|||
cur_cfg_->select_scheme(cur_scheme_->get_scheme_name().c_str());
|
||||
cur_cfg_->save();
|
||||
disconnect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
|
||||
comb_->setCurrentIndex(id + 1);
|
||||
comb_->setCurrentIndex(index);
|
||||
connect(comb_, SIGNAL(currentTextChanged(const QString)), this, SLOT(on_current_scheme_changed()));
|
||||
|
||||
changed_count_++;
|
||||
|
|
Loading…
Reference in New Issue