Skip to content

Problem with RelativeInsertPosition enum definition #60

@akaztp

Description

@akaztp

Enumeration of RelativeInsertPosition on DropInfo.cs file should be set to powers of 2 since it is a Flags enumeration.
Now is:
[Flags]
public enum RelativeInsertPosition
{
BeforeTargetItem = 0,
AfterTargetItem = 1,
TargetItemCenter = 2
}

which makes "bef" become true on:

RelativeInsertPosition pos = RelativeInsertPosition.AfterTargetItem;
bool bef = pos.HasFlag(RelativeInsertPosition.BeforeTargetItem);

On a local version of 0.1.3.6, I corrected the enumeration to:

[Flags]
public enum RelativeInsertPosition
{
    BeforeTargetItem = 1,
    AfterTargetItem = 2,
    TargetItemCenter = 4
}

And then it worked correctly.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions