Continue refactor

This commit is contained in:
Carl Philipp Klemm 2026-03-30 18:25:25 +02:00
parent 18cf2b01bd
commit 219fbfb4c7
14 changed files with 104 additions and 125 deletions

View file

@ -59,17 +59,27 @@ void ItemWidget::deleteItem()
void ItemWidget::moveToValue(int value)
{
if(auto workingItem = item_.lock())
workingItem->setValue(value);
{
ItemUpdateRequest request = workingItem->createValueUpdateRequest(value, ITEM_UPDATE_USER);
workingItem->requestUpdate(request);
}
else
{
disable();
}
}
void ItemWidget::moveToState(bool state)
{
if(auto workingItem = item_.lock())
workingItem->setValue(state);
{
ItemUpdateRequest request = workingItem->createValueUpdateRequest(state, ITEM_UPDATE_USER);
workingItem->requestUpdate(request);
}
else
{
disable();
}
}
void ItemWidget::disable()