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);
|
gl.glDisable(GLLightingFunc.GL_LIGHTING);
|
||||||
final RocketComponent picked = rr.pick(drawable, configuration,
|
final RocketComponent picked = rr.pick(drawable, configuration,
|
||||||
pickPoint, pickEvent.isShiftDown() ? selection : null);
|
pickPoint, pickEvent.isShiftDown() ? selection : null);
|
||||||
if (csl != null && picked != null) {
|
if (csl != null) {
|
||||||
final MouseEvent e = pickEvent;
|
final MouseEvent e = pickEvent;
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
csl.componentClicked(new RocketComponent[] { picked },
|
if ( picked == null ){
|
||||||
e);
|
log.debug("unselecting");
|
||||||
|
csl.componentClicked(new RocketComponent[] { }, e);
|
||||||
|
} else {
|
||||||
|
csl.componentClicked(new RocketComponent[] { picked }, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user