JadingTsunami / umapinfo-designer

A graphical tool for UMAPINFO creation
GNU General Public License v3.0
3 stars 2 forks source link

Type mismatch in wadreader.py (float vs int) #1

Closed smeghammer closed 2 months ago

smeghammer commented 2 months ago

Hi, just pulled this to try it out.

On starting and loading the PWAD, I got a type mismatch error:

Traceback (most recent call last):
  File "D:\python3\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "D:\Games\Doom\umapinfo-designer\UMAPINFODesigner\ui.py", line 1031, in level_changed
    self.refresh_automap(self.umap)
  File "D:\Games\Doom\umapinfo-designer\UMAPINFODesigner\ui.py", line 923, in refresh_automap
    self.mapimg = wadreader.get_waddata_map_image(umap, width=189)
  File "D:\Games\Doom\umapinfo-designer\UMAPINFODesigner\uio\wadreader.py", line 121, in get_waddata_map_image
    v.x = v.x * xscale
  File "D:\python3\lib\site-packages\omg\util.py", line 212, in __setattr__
    super().__setattr__(name, value)
TypeError: int expected instead of float

This prevented the map thumbnail from being generated.

It was a straightforward fix - I'll create a PR for it

JadingTsunami commented 2 months ago

Thanks for the report. Fixed with your submission of PR #2