Free cookie consent management tool by TermsFeed Policy Generator

Opened 9 years ago

Closed 9 years ago

#2343 closed defect (done)

Values of variables are not updated correctly in the VariableStoreView

Reported by: jkarder Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.12
Component: Scripting.Views Version: 3.3.11
Keywords: Cc:

Description

When a variable is added to the variable store, the view registers to Item.ToStringChanged in order to update the shown value accordingly. When the variable's value changes, the variable store fires OnItemsReplaced. The old variable (which the view registered to) is now stored in CollectionItemsChangedEventArgs.OldItems, the new variable is stored in CollectionItemsChangedEventArgs.Items. Therefore, the view must deregister from the old variable (since it's not in the variable store anymore) and register to the new one.

I've attached a sample script that can be used to show the error.

Attachments (1)

FaultyValueUpdateScript.hl (1.1 KB) - added by jkarder 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by jkarder

comment:1 Changed 9 years ago by jkarder

  • Status changed from new to accepted

comment:2 Changed 9 years ago by jkarder

r12088: fixed value update

  • properly (de)registered event handler
  • extracted code that does not have to be invoked

comment:3 Changed 9 years ago by jkarder

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

comment:4 Changed 9 years ago by mkommend

  • Status changed from reviewing to readytorelease

Reviewed r12088.

comment:5 Changed 9 years ago by mkommend

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

r12275: Merged r12088 into stable.

Note: See TracTickets for help on using tickets.