Fix LT-22187: Allow reordering fields#435
Conversation
jasonleenaylor
left a comment
There was a problem hiding this comment.
Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
DistFiles/Language Explorer/Configuration/Parts/LexEntry.fwlayout line 7 at r1 (raw file):
<layout class="LexEntry" type="detail" name="Normal"> <part ref="ChangeHandler"/> <part label="Lexeme Form" ref="LexemeForm"/>
Was removing the label necessary?
Src/Common/Controls/DetailControls/Slice.cs line 2941 at r1 (raw file):
// This is the first node in a (possibly singleton) sequence. // Does it represent itself (and so can be moved) or the sequence as a whole (and so can't be moved at this level)? // Look at the reference part nodes above node to determine.
This was a good effort and describing what we are trying to determine. I'm trying to decide what kind of comments/refactors will help us fix any future bugs here or avoid breaking this if we need to modify it for another reason.
Src/Common/Controls/DetailControls/Slice.cs line 2943 at r1 (raw file):
// Look at the reference part nodes above node to determine. bool found = false; string label = XmlUtils.GetOptionalAttributeValue(node, "label", null);
I don't see this label being used anywhere.
|
Removing the Lexeme Form label was necessary. It was redundant with the label in AsLexemeForm, and it made the code think that there was a header above AsLexemeForm that could be moved, something like: Lexeme Form Then the code determined that AsLexemeForm could not be move because it had no siblings. If we don't want Lexeme Form to be moved, then we can restore the higher Lexeme Form label. |
jasonleenaylor
left a comment
There was a problem hiding this comment.
Reviewed 1 of 2 files at r1, 1 of 2 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @jtmaxwell3)
This fixes https://jira.sil.org/browse/LT-22187. When you move a field, it moves it after the part for the next slice. For this to work, you have to get the right part for the slice (the one that can be moved).
This change is