diff --git a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java index 1ac50892..1b1d4dcd 100644 --- a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java +++ b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java @@ -341,7 +341,7 @@ public class EditorScenePanel extends StageScenePanel } // pass location information on to the dialog - _dialogPortal.prepare((StageScene)_scene, portal); + _dialogPortal.prepare(_scene, portal); // allow the user to edit the info EditorDialogUtil.display(_frame, _dialogPortal); @@ -965,12 +965,11 @@ public class EditorScenePanel extends StageScenePanel { if (tile instanceof ObjectTile) { // create a temporary scene object for this tile - SceneObject nobj = new SceneObject(this, new ObjectInfo(0, x, y), - (ObjectTile)tile); + SceneObject nobj = new SceneObject(this, new ObjectInfo(0, x, y), (ObjectTile)tile); // report invalidity if overlaps any existing objects int ocount = _vizobjs.size(); for (int ii = 0; ii < ocount; ii++) { - SceneObject scobj = (SceneObject)_vizobjs.get(ii); + SceneObject scobj = _vizobjs.get(ii); if (scobj.objectFootprintOverlaps(nobj)) { return false; } diff --git a/src/java/com/threerings/stage/tools/editor/EditorScrollBox.java b/src/java/com/threerings/stage/tools/editor/EditorScrollBox.java index 28d965c8..b9d44d48 100644 --- a/src/java/com/threerings/stage/tools/editor/EditorScrollBox.java +++ b/src/java/com/threerings/stage/tools/editor/EditorScrollBox.java @@ -128,11 +128,11 @@ public class EditorScrollBox extends ScrollBox int horz = _horz.getMaximum() - _horz.getMinimum(); int vert = _vert.getMaximum() - _vert.getMinimum(); int height = MAX_HEIGHT; - int width = (int) Math.round(horz * (((float) height) / vert)); + int width = Math.round(horz * (((float) height) / vert)); int maxwidth = getParent().getWidth(); if (maxwidth > 0 && width > maxwidth) { - height = (int) Math.round(height * (((float) maxwidth) / width)); + height = Math.round(height * (((float) maxwidth) / width)); width = maxwidth; } diff --git a/src/java/com/threerings/stage/tools/editor/PortalTool.java b/src/java/com/threerings/stage/tools/editor/PortalTool.java index 5827ee11..442e8f26 100644 --- a/src/java/com/threerings/stage/tools/editor/PortalTool.java +++ b/src/java/com/threerings/stage/tools/editor/PortalTool.java @@ -48,7 +48,7 @@ public class PortalTool extends MouseInputAdapter public void init (EditorScenePanel panel, int centerx, int centery) { _panel = panel; - _scene = (StageScene)_panel.getScene(); + _scene = _panel.getScene(); // adjust the center screen coordinate so that it is positioned at // the closest full coordinate where a portal may be placed diff --git a/src/java/com/threerings/stage/tools/editor/TileInfoPanel.java b/src/java/com/threerings/stage/tools/editor/TileInfoPanel.java index 0a181bd3..cd62d11d 100644 --- a/src/java/com/threerings/stage/tools/editor/TileInfoPanel.java +++ b/src/java/com/threerings/stage/tools/editor/TileInfoPanel.java @@ -386,7 +386,7 @@ public class TileInfoPanel extends JSplitPane // now select the previously selected item, or the first... if (_selected == null) { - _selected = (DefaultMutableTreeNode) root.getFirstLeaf(); + _selected = root.getFirstLeaf(); } _tsettree.setSelectionPath(new TreePath(_selected.getPath())); }