Uncaught exception on importing a terrain heightmap

Issue #145 resolved
Carsten Fuchs created an issue

As reported at http://www.cafu.de/forum/viewtopic.php?f=9&t=1659, the importing of terrain heightmaps with incorrect dimensions raises an exception that we don't handle.

The correct behavior is to display a helpful error message instead.

Comments (2)

  1. Former user Account Deleted
    • assigned issue to
    • changed status to resolved

    In [changeset:"8485927c5ed7590361bad48928dbd551708a8e0b/git"]: {{{ #!CommitTicketReference repository="git" revision="8485927c5ed7590361bad48928dbd551708a8e0b" Map Editor: Revise the loading/importing of heightmaps into terrains.

    The new code is more robust and provides an error message explaining the problem rather than leaving the exception unhandled.

    In the future, we should consider refactoring the whole heightmap-related code, e.g. moving it into an explicit, commonly used HeightmapT class that loads, "validates" and keeps the heightmap data from which new terrains can be constructed or existing terrains be updated (this would also eliminate the duplication of the TerrainT's loading and validating code in MapTerrainT).

    Fixes #145. }}}

  2. Log in to comment