Skip to content

Commit 4882da8

Browse files
committed
Fix issue with deletable annotations in Signal/Image View
(fix #69)
1 parent 78db74d commit 4882da8

File tree

3 files changed

+488
-414
lines changed

3 files changed

+488
-414
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ for future and past milestones.
1616
is when it is really needed (i.e. for long operations)
1717
* Thanks to [@marcel-goldschen-ohm](https://github.com/marcel-goldschen-ohm) for the
1818
very thorough feedback and the help in testing the fix
19+
* Fixed [Issue #69](https://github.com/DataLab-Platform/DataLab/issues/69) - Annotations should be read-only in Signal/Image View
20+
* Regarding the annotations, DataLab's current behavior is the following:
21+
* Annotations are created only when showing the signal/image in a separate window
22+
(double-click on the object, or "View" > "View in a new window")
23+
* When displaying the objects in either the "Signal View" or the "Image View", the
24+
annotations should be read-only (i.e. not movable, nor resizable or deletable)
25+
* However, some annotations were still deletable in the "Signal View" and the
26+
"Image View": this is now fixed
27+
* Note that the fact that annotations can't be created in the "Signal View" or the
28+
"Image View" is a limitation of the current implementation, and may be improved in
29+
future versions
1930

2031
## DataLab Version 0.15.0 ##
2132

cdl/core/model/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,9 @@ def iterate_shape_items(self, editable: bool = False):
994994
if self.annotations:
995995
try:
996996
for item in load_items(JSONReader(self.annotations)):
997-
set_plot_item_editable(item, editable)
998997
if isinstance(item, AnnotatedShape):
999998
config_annotated_shape(item, fmt, lbl, "shape/annotation")
999+
set_plot_item_editable(item, editable)
10001000
yield item
10011001
except json.decoder.JSONDecodeError:
10021002
pass

0 commit comments

Comments
 (0)