Skip to content

Commit

Permalink
Merge pull request jMonkeyEngine#571 from neph1/Issue_568
Browse files Browse the repository at this point in the history
remove fields not existing in Minie
  • Loading branch information
neph1 authored Mar 2, 2024
2 parents 8da3a1c + 35e14f4 commit df8f9f8
Showing 1 changed file with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import com.jme3.math.Vector3f;
import java.awt.Image;
import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import javax.swing.Action;
import org.openide.actions.DeleteAction;
Expand Down Expand Up @@ -95,8 +94,8 @@ protected Sheet createSheet() {
}

set.put(makeProperty(obj, Vector3f.class, "getLocation", "Location"));
set.put(makeProperty(obj, Vector3f.class, "getAxle", "Axis"));
set.put(makeProperty(obj, Vector3f.class, "getDirection", "Direction"));
//set.put(makeProperty(obj, Vector3f.class, "getAxle", "Axis"));
//set.put(makeProperty(obj, Vector3f.class, "getDirection", "Direction"));
set.put(makeProperty(obj, boolean.class, "isFrontWheel", "setFrontWheel", "Front Wheel"));
set.put(makeProperty(obj, float.class, "getFrictionSlip", "setFrictionSlip", "Friction Slip"));
set.put(makeProperty(obj, float.class, "getMaxSuspensionForce", "setMaxSuspensionForce", "Max Suspension Force"));
Expand Down Expand Up @@ -131,26 +130,22 @@ public boolean canDestroy() {
@Override
public void destroy() throws IOException {
try {
SceneApplication.getApplication().enqueue(new Callable<Void>() {

public Void call() throws Exception {
for (int i= 0; i < vehicle.getNumWheels(); i++) {
if(vehicle.getWheel(i)==wheel){
vehicle.removeWheel(i);
return null;
}
SceneApplication.getApplication().enqueue(() -> {
for (int i = 0; i < vehicle.getNumWheels(); i++) {
if (vehicle.getWheel(i) == wheel) {
vehicle.removeWheel(i);
return null;
}
return null;
}
return null;
}).get();
((AbstractSceneExplorerNode)getParentNode()).refresh(true);
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) {
((AbstractSceneExplorerNode) getParentNode()).refresh(true);
} catch (InterruptedException | ExecutionException ex) {
Exceptions.printStackTrace(ex);
}
}

@Override
public Class getExplorerObjectClass() {
return VehicleWheel.class;
}
Expand Down

0 comments on commit df8f9f8

Please sign in to comment.