Bug fixing to make sure measurements are re-added to toolData

This commit is contained in:
Erik Ziegler committed 2016-01-11 18:17:02 +01:00
1 parent 798fe5a3dc
commit be5ff6f590
3 files changed
+17 -1

No files matched your search

@@ -93,6 +93,13 @@ var LesionManager = (function() {
// Insert this into the Measurements Collection
// Save the ID into the toolData (not sure if this works?)
measurement.id = Measurements.insert(measurement);
// Update the database entry so it can be readded next time the study is loaded
Measurements.update(measurement.id, {
$set: {
toolDataInsertedManually: false
}
});
} else {
lesionData.id = existingMeasurement._id;
@@ -75,7 +75,10 @@ Template.lesionTable.onRendered(function() {
// timepointLoaded property is used to put indicator for loaded timepoints in viewport
self.autorun(function() {
// Temporary until we have a real window manager with events for series/study changed
Session.get('NewSeriesLoaded');
if (!Session.get('NewSeriesLoaded')) {
return;
}
console.log('ViewerData changed, check for displayed timepoints');
// Get study dates of imageViewerViewport elements
@@ -110,6 +113,8 @@ Template.lesionTable.onRendered(function() {
var timepoints = Timepoints.find({
patientId: loadedStudyDates.patientId
}, {
reactive: false
});
timepoints.forEach(function(timepoint) {
@@ -124,5 +129,8 @@ Template.lesionTable.onRendered(function() {
}
});
});
// Temporary until we have a real window manager with events for series/study changed
Session.set('NewSeriesLoaded', false);
});
});
@@ -322,6 +322,7 @@ function loadSeriesIntoViewport(data, templateData) {
}
// Temporary until we have a real window manager with events for series/study changed
console.log('Set NewSeriesLoaded');
Session.set('NewSeriesLoaded', Random.id());
// Run any renderedCallback that exists in the data context