Редакция 151 | Редакция 158 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 151 | Редакция 152 | ||
---|---|---|---|
Строка 705... | Строка 705... | ||
705 | void MainWindow::on_comboBox_currentIndexChanged( int index ){ |
705 | void MainWindow::on_comboBox_currentIndexChanged( int index ){ |
706 | QStringList classesNameList;
|
706 | QStringList classesNameList;
|
707 | QStringList classesID_list;
|
707 | QStringList classesID_list;
|
708 | QString ID_str;
|
708 | QString ID_str;
|
709 | if (index == -1) return; |
709 | if (index == -1) return; |
- | 710 | if (!comboBox_slot_enable) return; // èíäåêñ ïîìåíÿëà ïðîãðàììà, îí íå áûë èçìåíåí âðó÷íóþ, âûõîäèì |
|
710 | int row; |
711 | int row; |
711 | 712 | ||
712 | classesID_list = class_list_map.keys(); |
713 | classesID_list = class_list_map.keys(); |
713 | classesNameList = class_list_map.values(); |
714 | classesNameList = class_list_map.values(); |
714 | ID_str = classesID_list[index]; |
715 | ID_str = classesID_list[index]; |
Строка 798... | Строка 799... | ||
798 | else { // åñëè ïóñòàÿ |
799 | else { // åñëè ïóñòàÿ |
799 | ui->comboBox->setEnabled(true); |
800 | ui->comboBox->setEnabled(true); |
800 | return; |
801 | return; |
801 | 802 | ||
802 | }
|
803 | }
|
- | 804 | comboBox_slot_enable = false; // ÷òîáû ñëîò comboBox íå ìåíÿë ñòðîêó ìîäåëè |
|
803 | if (index != -1) ui->comboBox->setCurrentIndex(index); |
805 | if (index != -1) ui->comboBox->setCurrentIndex(index); |
804 | - | ||
- | 806 | comboBox_slot_enable = true; |
|
805 | ui->comboBox->setEnabled(true); |
807 | ui->comboBox->setEnabled(true); |
806 | 808 | ||
807 | 809 | ||
808 | }
|
810 | }
|
809 | // if ((rootItem1) == (item) ) ui->comboBox->setEnabled(true);
|
811 | // if ((rootItem1) == (item) ) ui->comboBox->setEnabled(true);
|