Free cookie consent management tool by TermsFeed Policy Generator

Opened 8 years ago

Closed 7 years ago

#2724 closed feature request (done)

EnumValueView should consider the FlagsAttribute

Reported by: pfleck Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Data.Views Version: 3.3.14
Keywords: Cc:

Description

The current EnumValueView offers a combobox to select the enum values.

If the enum has the FlagAttribute, a list of checkboxes should be displayed instead, to allow arbitrary combinations of the enum values.

Change History (7)

comment:1 Changed 8 years ago by pfleck

  • Status changed from new to accepted

r14597

  • Added a ListView for Flag-attributed enums in the EnumValueView.
  • Simplified EnumValue cloning (already done in base-constructor).
  • Added a SetFlag helper for enums.

comment:2 Changed 8 years ago by pfleck

  • Owner changed from pfleck to mkommend
  • Status changed from accepted to reviewing

Because EnumValues with Flags are not used yet in the trunk I used the following test script:

  public override void Main() {
    vars.MyEnum = new EnumValue<MyEnum>();
    vars.MyEnumFlags = new EnumValue<MyEnumFlags>();
    vars.MyEnumFlagsFoo = new EnumValue<MyEnumFlagsFoo>();
  }
  enum MyEnum {
    First, Second, Third
  }
  [Flags] enum MyEnumFlags {
    First, Second, Third, Forth, Sixth, Seventh
  }
  [Flags] enum MyEnumFlagsFoo {
    None = 0, First = 1 << 0, Second = 1 << 1, Third = 1 << 2,  Forth = 1 << 3, Sixth = 1 << 4, Seventh = 1 << 5
  }

comment:3 Changed 8 years ago by mkommend

  • Owner changed from mkommend to pfleck
  • Status changed from reviewing to assigned

comment:4 Changed 8 years ago by pfleck

  • Owner changed from pfleck to mkommend
  • Status changed from assigned to reviewing

r15009 Moved EnumHelper (for SetFlags).

comment:5 Changed 8 years ago by mkommend

r15010: Fixed caption of EnumValueView.

comment:6 Changed 8 years ago by mkommend

  • Status changed from reviewing to readytorelease

Reviewed r14597, r15009, and r15010.

comment:7 Changed 7 years ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed

r15117: Merged r14597, r15009, r15010 into stable.

Note: See TracTickets for help on using tickets.