Trigger componentClicked with an empty list if no component is picked by
a clock on the 3d model
This commit is contained in:
parent
98db1885c2
commit
62cfd2730e
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user