Navigation Menu

Skip to content

Commit

Permalink
Simplify FunctionDialog model usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole André Vadla Ravnås committed Oct 18, 2014
1 parent 21bf3c9 commit bd8f661
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions components/FunctionDialog.qml
Expand Up @@ -10,13 +10,14 @@ Dialog {
signal rename(var func, string oldName, string newName);

onFunctionIdChanged: {
var f = models.functions.getById(functionId);
_func = {
id: f.id,
name: f.name
};
name.text = f.name;
script.text = f.probeScript;
_func = models.functions.getById(functionId);
if (_func !== null) {
name.text = _func.name;
script.text = _func.probeScript;
} else {
name.text = "";
script.text = "";
}
}

onAccepted: {
Expand Down

0 comments on commit bd8f661

Please sign in to comment.