mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 17:16:00 -05:00
Resize list to minimum necessary height
This commit is contained in:
@@ -137,6 +137,7 @@ void MacroActionRunEdit::UpdateEntryData()
|
||||
QListWidgetItem *item = new QListWidgetItem(arg, _argList);
|
||||
item->setData(Qt::UserRole, arg);
|
||||
}
|
||||
SetArgListSize();
|
||||
}
|
||||
|
||||
void MacroActionRunEdit::PathChanged(const QString &text)
|
||||
@@ -175,6 +176,7 @@ void MacroActionRunEdit::AddArg()
|
||||
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_args << arg;
|
||||
SetArgListSize();
|
||||
}
|
||||
|
||||
void MacroActionRunEdit::RemoveArg()
|
||||
@@ -195,6 +197,7 @@ void MacroActionRunEdit::RemoveArg()
|
||||
return;
|
||||
}
|
||||
delete item;
|
||||
SetArgListSize();
|
||||
}
|
||||
|
||||
void MacroActionRunEdit::ArgUp()
|
||||
@@ -224,3 +227,9 @@ void MacroActionRunEdit::ArgDown()
|
||||
_entryData->_args.move(idx, idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroActionRunEdit::SetArgListSize()
|
||||
{
|
||||
setHeightToContentHeight(_argList);
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user