File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -168,8 +168,8 @@ void ControlPanel::applySessionSettings(Settings::Session session)
168168 } else {
169169 index = m_combo_Baud->findData (-1 );
170170 if (index != -1 ) {
171+ m_combo_Baud->setItemText (index, QString::number (session.baudRate ));
171172 m_combo_Baud->setCurrentIndex (index);
172- m_combo_Baud->setCurrentText (QString::number (session.baudRate ));
173173 }
174174 }
175175
@@ -296,7 +296,10 @@ void ControlPanel::fillBaudCombo()
296296 m_combo_Baud->addItem (QStringLiteral (" Custom" ), -1 );
297297
298298 connect (m_combo_Baud, static_cast <void (QComboBox::*)(int )>(&QComboBox::currentIndexChanged),
299- [=]() { emit settingChanged (Settings::BaudRate, m_combo_Baud->currentData ()); });
299+ [=]() { int custom = m_combo_Baud->currentData ().toInt ();
300+ emit settingChanged (Settings::BaudRate,
301+ (custom == -1 ) ? m_combo_Baud->currentText () : m_combo_Baud->currentData ());
302+ });
300303}
301304
302305void ControlPanel::fillFlowCombo ()
You can’t perform that action at this time.
0 commit comments