[apps/graph/list] do not suppress the last function of the list

Change-Id: Iba5af053fa388fd65cc9017507b21ee1dd853b9e
This commit is contained in:
Émilie Feral
2016-09-23 18:06:19 +02:00
committed by Romain Goyet
parent ff70414108
commit a6ed6fcc31

View File

@@ -80,10 +80,15 @@ bool ParameterController::handleEnter() {
}
case 2:
{
m_functionStore->removeFunction(m_function);
StackViewController * stack = (StackViewController *)(parentResponder());
stack->pop();
return true;
if (m_functionStore->numberOfFunctions() > 1) {
m_functionStore->removeFunction(m_function);
StackViewController * stack = (StackViewController *)(parentResponder());
stack->pop();
return true;
} else {
// TODO: add an warning "no function to delete!"
return false;
}
}
default:
{