Skip to content

Commit

Permalink
fix programatical unhighlighting for BarCharView (#3159)
Browse files Browse the repository at this point in the history
  • Loading branch information
jekahy authored and jjatie committed Jan 12, 2018
1 parent 2c584bf commit fc21586
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,13 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD

if h === nil || h == self.lastHighlighted
{
highlightValue(nil, callDelegate: true)
lastHighlighted = nil
highlightValue(nil, callDelegate: true)
}
else
{
highlightValue(h, callDelegate: true)
lastHighlighted = h
highlightValue(h, callDelegate: true)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate

if h == nil
{
self.lastHighlighted = nil
_indicesToHighlight.removeAll(keepingCapacity: false)
}
else
Expand Down

0 comments on commit fc21586

Please sign in to comment.