Skip to content

Commit

Permalink
Fixes issue where certain nested components weren't correctly updatin…
Browse files Browse the repository at this point in the history
…g their tile hash.
  • Loading branch information
Valkryst committed Aug 18, 2018
1 parent d774e4a commit ae2da67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions VTerminal.iml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/res_test" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/samples" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
Expand Down
7 changes: 2 additions & 5 deletions src/com/valkryst/VTerminal/TileGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,8 @@ public long getPositionHash(final int tileX, final int tileY) {
childLock.readLock().lock();

for (final TileGrid childGrid : childGrids) {
final int childXPos = childGrid.getXPosition();
final int childYPos = childGrid.getYPosition();

final int tempX = tileX - (childXPos == position.x ? 0 : childXPos);
final int tempY = tileY - (childYPos == position.y ? 0 : childYPos);
final int tempX = tileX - childGrid.getXPosition();
final int tempY = tileY - childGrid.getYPosition();

hash += childGrid.getPositionHash(tempX, tempY);
}
Expand Down

0 comments on commit ae2da67

Please sign in to comment.