Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] owdistancemap: Fix an implicit float->int conversion error #5998

Merged

Conversation

ales-erjavec
Copy link
Contributor

Raises error on Python 3.10

Issue

Distance Map raises an error on Python 3.10 when setting any Annotations that are not None

----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/home/ales/devel/orange3/Orange/widgets/unsupervised/owdistancemap.py", line 695, in resizeEvent
    self._updateFontSize()
  File "/home/ales/devel/orange3/Orange/widgets/unsupervised/owdistancemap.py", line 713, in _updateFontSize
    fontsize = min(self._point_size(lineheight), maxfontsize)
  File "/home/ales/devel/orange3/Orange/widgets/unsupervised/owdistancemap.py", line 721, in _point_size
    font.setPointSize(height)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'
-------------------------------------------------------------------------------
Description of changes

Fix an implicit float->int conversion error

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #5998 (061d973) into master (17a242f) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5998      +/-   ##
==========================================
+ Coverage   86.46%   86.56%   +0.10%     
==========================================
  Files         315      315              
  Lines       67248    67251       +3     
==========================================
+ Hits        58146    58217      +71     
+ Misses       9102     9034      -68     

@janezd janezd merged commit db4043a into biolab:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants