Commit 7d609bc3 authored by lm's avatar lm

Fixed minor bug in QGCToolWidget

parent 1523f3a4
......@@ -208,7 +208,10 @@ QList<QGCToolWidgetItem*>* QGCToolWidget::itemList()
void QGCToolWidget::addParam()
{
QGCParamSlider* slider = new QGCParamSlider(this);
if (ui->hintLabel) delete ui->hintLabel;
if (ui->hintLabel)
{
ui->hintLabel->deleteLater();
}
toolLayout->addWidget(slider);
slider->startEditMode();
}
......@@ -216,14 +219,20 @@ void QGCToolWidget::addParam()
void QGCToolWidget::addAction()
{
QGCActionButton* button = new QGCActionButton(this);
if (ui->hintLabel) delete ui->hintLabel;
if (ui->hintLabel)
{
ui->hintLabel->deleteLater();
}
toolLayout->addWidget(button);
button->startEditMode();
}
void QGCToolWidget::addToolWidget(QGCToolWidgetItem* widget)
{
if (ui->hintLabel) delete ui->hintLabel;
if (ui->hintLabel)
{
ui->hintLabel->deleteLater();
}
toolLayout->addWidget(widget);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment