Saving a selection does not work correct

Submitted by Joerg Freudenstein on Tuesday, 9 July, 2013 - 16:59
Issue ID
126
Component
Tool
Category
Bug report
Priority
Critical
Assigned
Status
Fixed
Source
Website
Description

To save a selection with the DATEX Tool (file ending .sel) does not work properly. There are often (always?) more elements included in the resulting sel file (which is a readable xml-structure) than selected in the tree. Best example is an unselected (empty) tree from the D2 model (XMI export from D2 website model, deselecting the trunk element D2LogicalModel in the tool - which takes some while, by the way). The resulting .sel file ist not empty, as to be expected, but more than 32.000 lines long. Loading this .sel file again gives some very strange selection of different elements without any order or scheme.

Found Version
{"changeLogs":[{"date":1528372408535,"componentOLD":"- Select a value -","component":"Tool","categoryOLD":"- Select a value -","category":"Bug report","priorityOLD":"- None -","priority":"Critical","assignedOLD":"","assigned":"jaderberg (22)","statusOLD":"- None -","status":"Fixed"},{"date":1537269118144}]}

Posted by jaderberg on August 14, 2024 Permalink

The size and the elements in the selection file is by design. When a selection is saved the internal meta model is simply saved to disk. An improvement could be to save only those that are selected, but that has no functional benefits.

So, clearing out all elements in the selection will never generate an empty selection file. Actually it will have the same amount of elements as one that has all elements selected.

If I do as you describe
1.Load the model
2. Un-selecting all elements, by clicking D2LogicalModel
3. Save selection
4. Load same selection

Then I will get a correct tree (all elements de-selected). If I generate a schema I will get an "empty" schema with just the _ExtensionType.
I have tried this twice.
Can this problem be related to issue 130?

Posted by jaderberg on July 14, 2023 Permalink

I did the same test again on the version prepared for version 2.3 and it works. It might have been problems that now have been fixed with the changes made in the selection feature.