mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/graph/list] Display warning when no function can be deleted
Change-Id: Id872300984efab3b30b8a7c97d7c83b4f6afd4cb
This commit is contained in:
@@ -55,7 +55,14 @@ bool ParameterController::handleEvent(Ion::Events::Event event) {
|
||||
stack->pop();
|
||||
return true;
|
||||
} else {
|
||||
// TODO: add an warning "no function to delete!"
|
||||
if (m_functionStore->numberOfDefinedFunctions() == 1) {
|
||||
Function * f = m_functionStore->definedFunctionAtIndex(0);
|
||||
f->setContent("");
|
||||
StackViewController * stack = (StackViewController *)(parentResponder());
|
||||
stack->pop();
|
||||
return true;
|
||||
}
|
||||
app()->displayWarning("Pas de fonction a supprimer");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user