Fix bug in Add increment tool button.
--HG-- branch : develop
This commit is contained in:
parent
1393be669b
commit
1f25b81f88
|
@ -750,14 +750,20 @@ void DialogIncrements::AddNewIncrement(IncrementType type)
|
||||||
{
|
{
|
||||||
qCDebug(vDialog, "Add new increment");
|
qCDebug(vDialog, "Add new increment");
|
||||||
|
|
||||||
auto *action = qobject_cast<QAction *>(sender());
|
bool incrementMode = true;
|
||||||
if (action == nullptr)
|
if (auto *action = qobject_cast<QAction *>(sender()))
|
||||||
|
{
|
||||||
|
incrementMode = action->data().toBool();
|
||||||
|
}
|
||||||
|
else if (auto *button = qobject_cast<QToolButton *>(sender()))
|
||||||
|
{
|
||||||
|
incrementMode = button == ui->toolButtonAdd;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool incrementMode = action->data().toBool();
|
|
||||||
|
|
||||||
QTableWidget *table = incrementMode ? ui->tableWidgetIncrement : ui->tableWidgetPC;
|
QTableWidget *table = incrementMode ? ui->tableWidgetIncrement : ui->tableWidgetPC;
|
||||||
|
|
||||||
const QString name = GetCustomName();
|
const QString name = GetCustomName();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user