mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
10 stars 6 forks source link

Don't duplicate ROI names after stack modification #2248

Closed samtygier-stfc closed 4 days ago

samtygier-stfc commented 5 days ago

Issue

Closes #2246

Description

Move the reset of _roi_id_counter so that it only happens when all the ROIs are cleared. Add a check in the presenter so that this would be caught earlier. Add some doc strings and rename a method, because it was not clear what the difference was, Add a test.

Testing

Includes a new test

Acceptance Criteria

Use the test case on #2246

Documentation

Release notes

coveralls commented 5 days ago

Coverage Status

coverage: 73.131% (-0.006%) from 73.137% when pulling ddba62671620902be3d8857969d484cf6ef4bf4a on 2246-roi-name-dupe into 1cd9d21191eef1df5ff0deec0b0a0db4272397f4 on main.