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

Choropleth does not reset selection #163

Closed
janezd opened this issue Jan 16, 2023 · 0 comments · Fixed by #168
Closed

Choropleth does not reset selection #163

janezd opened this issue Jan 16, 2023 · 0 comments · Fixed by #168

Comments

@janezd
Copy link
Collaborator

janezd commented Jan 16, 2023

Geo version: 0.3.2-dev
Orange version: 3.33-dev

Actual behavior

Choropleth seems to not reset selection upon receiving new data.

Steps to reproduce the behavior

The way I encountered this:

  • do hierarchical clustering, output result to choropleth,
  • in clustering, select all clusters,
  • in choroplet, select one region
  • in clustering, select one small cluster, e.g. two points (if this does not crash, change selection).

Crashes with

  File "/Users/janez/dev/orange3-geo/orangecontrib/geo/widgets/owchoropleth.py", line 776, in apply_selection
    selection[index_group[0]] = index_group[1]
IndexError: index 159 is out of bounds for axis 0 with size 6
Notes

On the first glance, set_data should reset selection (it doesn't). On the second, reset may belong inside

        if not (data_existed and self.data is not None and
                array_equal(effective_data.X, self.effective_data.X)):

But the proper approach is probably to remove from selection all regions that no longer appear in the data.

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 a pull request may close this issue.

1 participant