Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loss of sensors #1442

Merged
merged 4 commits into from Oct 25, 2021
Merged

Fix loss of sensors #1442

merged 4 commits into from Oct 25, 2021

Conversation

IKhonakhbeeva
Copy link
Contributor

No description provided.

@IKhonakhbeeva IKhonakhbeeva added bug Something isn't working 2D model labels Oct 13, 2021
@IKhonakhbeeva IKhonakhbeeva added this to the 2021.3 milestone Oct 13, 2021
@@ -113,7 +113,9 @@ QLayout *DevicesConfigurationWidget::initPort(const QString &robotModelName
}

if (mAutosaveMode) {
connect(comboBox, &QComboBox::currentTextChanged, this, &DevicesConfigurationWidget::save);
connect(comboBox, &QComboBox::currentTextChanged, this, [this](){
propagateChangesFromBox(static_cast<QComboBox *>(sender()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qobject_cast?

void DevicesConfigurationWidget::propagateChanges(const PortInfo &port, const DeviceInfo &sensor)
void DevicesConfigurationWidget::propagateChangesFromBox(QComboBox *box)
{
const PortInfo port = box->property("port").value<PortInfo>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const PortInfo port = box->property("port").value<PortInfo>();
const PortInfo &port = box->property("port").value<PortInfo>();

void DevicesConfigurationWidget::propagateChangesFromBox(QComboBox *box)
{
const PortInfo port = box->property("port").value<PortInfo>();
const DeviceInfo device = box->itemData(box->currentIndex()).value<DeviceInfo>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const DeviceInfo device = box->itemData(box->currentIndex()).value<DeviceInfo>();
const DeviceInfo &device = box->itemData(box->currentIndex()).value<DeviceInfo>();

@iakov iakov merged commit 5e179c3 into trikset:master Oct 25, 2021
@iakov iakov mentioned this pull request Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2D model bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants