--- gigedit/trunk/src/gigedit/mainwindow.cpp 2019/02/12 18:54:40 3468 +++ gigedit/trunk/src/gigedit/mainwindow.cpp 2019/02/12 18:54:58 3469 @@ -2731,6 +2731,7 @@ set_title(_("File Properties")); eName.set_width_chars(50); + connect(eFileFormat, &PropDialog::set_FileFormat); connect(eName, &DLS::Info::Name); connect(eCreationDate, &DLS::Info::CreationDate); connect(eComments, &DLS::Info::Comments); @@ -2792,8 +2793,6 @@ quitButton.grab_focus(); quitButton.signal_clicked().connect( sigc::mem_fun(*this, &PropDialog::hide)); - eFileFormat.signal_value_changed().connect( - sigc::mem_fun(*this, &PropDialog::onFileFormatChanged)); quitButton.show(); vbox.show(); @@ -2805,6 +2804,7 @@ void PropDialog::set_file(gig::File* file) { m_file = file; + update(file->pInfo); // update file format version combo box const std::string sGiga = "Gigasampler/GigaStudio v"; @@ -2820,18 +2820,16 @@ std::vector texts; for (int i = 0; i < txts.size(); ++i) texts.push_back(txts[i].c_str()); texts.push_back(NULL); values.push_back(0); + + update_model++; eFileFormat.set_choices(&texts[0], &values[0]); eFileFormat.set_value(major); + update_model--; } -void PropDialog::onFileFormatChanged() { - const int major = eFileFormat.get_value(); - if (m_file) m_file->pVersion->major = major; -} - -void PropDialog::set_info(DLS::Info* info) +void PropDialog::set_FileFormat(int value) { - update(info); + m_file->pVersion->major = value; } @@ -3067,7 +3065,6 @@ file_is_changed = false; propDialog.set_file(gig); - propDialog.set_info(gig->pInfo); instrument_name_connection.block(); int index = 0;