Skip to content
Snippets Groups Projects
Commit a093ec31 authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Repeated scene rendering eliminated

parent bf98047f
No related branches found
No related tags found
No related merge requests found
...@@ -138,10 +138,8 @@ public class DistanceAction extends ControlPanelAction { ...@@ -138,10 +138,8 @@ public class DistanceAction extends ControlPanelAction {
updateHausdorffDistanceInformation(); updateHausdorffDistanceInformation();
getSecondaryDrawableFace().setRenderHeatmap(heatmapRender); getSecondaryDrawableFace().setRenderHeatmap(heatmapRender);
renderScene();
} else { } else {
weightedFeaturePoints.hide(); weightedFeaturePoints.hide();
renderScene();
} }
}); });
topControlPanel.setSelectedComponent(controlPanel); // Focus Hausdorff distance panel topControlPanel.setSelectedComponent(controlPanel); // Focus Hausdorff distance panel
......
...@@ -72,7 +72,6 @@ public class RegistrationAction extends ControlPanelAction { ...@@ -72,7 +72,6 @@ public class RegistrationAction extends ControlPanelAction {
calculateFeaturePoints(); calculateFeaturePoints();
setHeatmap(); setHeatmap();
getSecondaryDrawableFace().setRenderHeatmap(heatmapRender); getSecondaryDrawableFace().setRenderHeatmap(heatmapRender);
renderScene();
} }
}); });
topControlPanel.setSelectedComponent(controlPanel); // Focus registration panel topControlPanel.setSelectedComponent(controlPanel); // Focus registration panel
......
...@@ -23,6 +23,11 @@ public class FaceToFaceToolBar extends RenderingToolBar { ...@@ -23,6 +23,11 @@ public class FaceToFaceToolBar extends RenderingToolBar {
super(canvas); super(canvas);
addPrimaryFaceButton(); addPrimaryFaceButton();
addSecondaryFaceButton(); addSecondaryFaceButton();
// (Re)render scene after all change listeners have been called
// (the first added litener is called last)
controlPanel.addChangeListener(e -> getCanvas().renderScene());
// Add distance panel to the control panel // Add distance panel to the control panel
new DistanceAction(getCanvas(), controlPanel); new DistanceAction(getCanvas(), controlPanel);
// Add registration panel to the control panel // Add registration panel to the control panel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment