Commit 7ac58531 authored by legoc's avatar legoc
Browse files

Improved the renaming of the trajectories

parent 37e3009a
...@@ -680,8 +680,15 @@ class TrajectoriesData { ...@@ -680,8 +680,15 @@ class TrajectoriesData {
size--; size--;
} }
// If size is equals, then the trajectories do not need to be updated. // If size is equals, update the names.
if (size === 0) { if (size === 0) {
// Update the names because the numor is set during the execution of the trajectory and not at the beginning.
for (let id in trajectoriesModel) {
let traj = trajectoriesModel[id];
this._trajectories[id]._name = traj.name;
}
return false; return false;
} }
......
...@@ -305,11 +305,13 @@ class TrajectoryPanelView { ...@@ -305,11 +305,13 @@ class TrajectoryPanelView {
} }
setTrajectoryName(id, name) { setTrajectoryName(id, name) {
let rowNode = this._trajectoryGrid.api.getRowNode(id);
if (rowNode !== undefined && rowNode !== null) { // Find the line: iterate over the nodes.
rowNode.setDataValue('name', name); this._trajectoryGrid.api.forEachNode((node) => {
} if (node.data.id === id) {
node.setDataValue('name', name);
}
});
} }
/** /**
......
...@@ -179,6 +179,7 @@ class NomadDataAccessor { ...@@ -179,6 +179,7 @@ class NomadDataAccessor {
this._fxScan = data.fxScan; this._fxScan = data.fxScan;
this._ssScan = data.ssScan; this._ssScan = data.ssScan;
this._nameScan = data.nameScan.toString(); this._nameScan = data.nameScan.toString();
this._startingTime = data.startingTime; this._startingTime = data.startingTime;
......
...@@ -166,9 +166,15 @@ class VEXPController { ...@@ -166,9 +166,15 @@ class VEXPController {
this._fxScan = this._dataAccessor.fxScan; this._fxScan = this._dataAccessor.fxScan;
this._ssScan = this._dataAccessor.ssScan; this._ssScan = this._dataAccessor.ssScan;
this._nameScan = this._dataAccessor.nameScan;
this._startingTime = this._dataAccessor.startingTime;
if (this._dataAccessor.nameScan === "0") {
this._nameScan = "?";
}
else {
this._nameScan = this._dataAccessor.nameScan;
}
this._startingTime = this._dataAccessor.startingTime;
this._dataScan = data.dataScan; this._dataScan = data.dataScan;
// Update the matrix. // Update the matrix.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment