Fix: adding connection
Crashed because it tried to select right group when there was no group to set.
This commit is contained in:
parent
d9431b173c
commit
bf8bb087e7
1 changed files with 4 additions and 2 deletions
|
|
@ -158,8 +158,10 @@ void ConnectionConfigurationWidget::retranslateUi()
|
||||||
void ConnectionConfigurationWidget::setData(const ConnectionConfig &cfg)
|
void ConnectionConfigurationWidget::setData(const ConnectionConfig &cfg)
|
||||||
{
|
{
|
||||||
auto group = cfg.parent();
|
auto group = cfg.parent();
|
||||||
auto group_idx = m_connectionModel->findGroup(group->conngroup_id);
|
if (group) {
|
||||||
cmbbxGroup->setCurrentIndex(group_idx);
|
auto group_idx = m_connectionModel->findGroup(group->conngroup_id);
|
||||||
|
cmbbxGroup->setCurrentIndex(group_idx);
|
||||||
|
}
|
||||||
|
|
||||||
m_uuid = cfg.uuid();
|
m_uuid = cfg.uuid();
|
||||||
edtName->setText(stdStrToQ(cfg.name()));
|
edtName->setText(stdStrToQ(cfg.name()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue