Continue refactor
This commit is contained in:
parent
18cf2b01bd
commit
219fbfb4c7
14 changed files with 104 additions and 125 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue