diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml index 9256ab5..803faea 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml @@ -60,7 +60,7 @@ D.Dialog { icon: "icons/settings/custom/label.svg" min: 1 width: dlgProperties.width - defValue: objEditor.obj.name + value: objEditor.obj.name onChanged: function(newValue) { var newName = Utils.parseName(newValue) if(newName != '' && objEditor.obj.name != newName) { diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js index a0cca33..d385862 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js @@ -158,7 +158,7 @@ class GainBode extends Common.ExecutableObject { update() { super.update() - if(Objects.currentObjects['Somme gains Bode'] != undefined) { + if(Objects.currentObjects['Somme gains Bode'] != undefined && Objects.currentObjects['Somme gains Bode'].length > 0) { Objects.currentObjects['Somme gains Bode'][0].recalculateCache() } else { Objects.createNewRegisteredObject('Somme gains Bode') diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js index 4fb296c..c2f2bbd 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js @@ -147,7 +147,7 @@ class PhaseBode extends Common.ExecutableObject { } update() { - if(Objects.currentObjects['Somme phases Bode'] != undefined) { + if(Objects.currentObjects['Somme phases Bode'] != undefined && Objects.currentObjects['Somme phases Bode'].length > 0) { Objects.currentObjects['Somme phases Bode'][0].recalculateCache() } else { Objects.createNewRegisteredObject('Somme phases Bode') diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js index 9412bbe..27af613 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js @@ -83,8 +83,8 @@ class SommeGainsBode extends Common.DrawableObject { var drawMin = 0.001 var baseY = 0 - var om0xGains = {100000: 0} // To draw the last part - var om0xPass = {100000: 'high'} // To draw the last part + var om0xGains = {1000000000: 0} // To draw the last part + var om0xPass = {1000000000: 'high'} // To draw the last part Objects.currentObjects['Gain Bode'].forEach(function(gainObj) { // Sorting by their om_0 position. var om0x = gainObj.om_0.x.execute() if(om0xGains[om0x] == undefined) { @@ -115,7 +115,7 @@ class SommeGainsBode extends Common.DrawableObject { } // Calculating parts var previousPallier = drawMin - for(var pallier = 0; pallier <= om0xList.length; pallier++) { + for(var pallier = 0; pallier < om0xList.length; pallier++) { var dbfn = new MathLib.Expression(`${gainTotal}*(ln(x)-ln(${previousPallier}))/ln(10)+${baseY}`) var inDrawDom = MathLib.parseDomain(`]${previousPallier};${om0xList[pallier]}]`) this.cachedParts.push([dbfn, inDrawDom])