From 913308d8868764c1126d3ffb9a13595dafd7d215 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Tue, 26 Jun 2012 03:54:59 +0700 Subject: [PATCH] Refs #1572. Fix highlighted status is not preserved. When higlightsBy == CPNoCellMask and showsStateBy == CPChangeBackgroundCellMask higlighted status must be preserved when a user switch state from Off to On. --- AppKit/CPButton.j | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 90afc3e57..7944347cc 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -529,7 +529,12 @@ CPButtonImageOffset = 3.0; [self highlight:YES]; } else - [self highlight:NO]; + { + if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask)) + [self highlight:[self state] != CPOffState]; + else + [self highlight:NO]; + } return startedTracking; }