Trigger componentClicked with an empty list if no component is picked by

a clock on the 3d model
This commit is contained in:
bkuker 2013-01-06 10:23:53 -05:00
parent 98db1885c2
commit 62cfd2730e

View File

@ -267,13 +267,17 @@ public class RocketFigure3d extends JPanel implements GLEventListener {
gl.glDisable(GLLightingFunc.GL_LIGHTING);
final RocketComponent picked = rr.pick(drawable, configuration,
pickPoint, pickEvent.isShiftDown() ? selection : null);
if (csl != null && picked != null) {
if (csl != null) {
final MouseEvent e = pickEvent;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
csl.componentClicked(new RocketComponent[] { picked },
e);
if ( picked == null ){
log.debug("unselecting");
csl.componentClicked(new RocketComponent[] { }, e);
} else {
csl.componentClicked(new RocketComponent[] { picked }, e);
}
}
});