Previously, clicking anywhere in an empty CPTableView with variable row height was causing a crash due to the code trying to find the latest cached row height. This patch adds a check to ensure the last cached row height is not nil.
Before this commit, row templates and views belo,ging to them were copied via archiving/unarchiving.
This was causing problems when the view was not completely CPCoding compliant, like for CPDatePicker.
With this commit, template views use CPCopying (-copy method) when available.
Also added CPCopying for CPDatePicker as a category in CPPredicateEditor.
Test: in CPPredicateEditorTest, on the right panel, choose a keypath, operator, and select 'Dates' in the popup for the right expression.
Fixes#2041
This PR fixes several issues about the textual CPDatePicker :
- Fixed the issue about keyView loop when not assigning the nextKeyView
- Changed the behavior of the component when editing or deleting the date. It works as in cocoa now.
- Fixed bug about frameSize of each component when editing
- Fixed bug about NaN or null values
- Added optimization
- Refactoring the code
When opening a sheet, with a double click the frame origin of the sheet changed and the parent disappeared.
This PR fix this issue.
Test app in Tests/Manual/AttachedSheet/AppController.j
Previously, the style of the blueish view that shows up on CPTableView when user is about to drop something on it was hard coded.
This patch adds the following theme attributes in CPTableView
// theme of the drop view for CPDragOperationOn on a non selected row
dropview-on-background-color
dropview-on-border-color
dropview-on-border-width
dropview-on-border-radius
// theme of the drop view for CPDragOperationOn on a selected row
dropview-on-selected-background-color
dropview-on-selected-border-color
dropview-on-selected-border-width
dropview-on-selected-border-radius
// theme of the drop view for CPDragOperationAbove on a non selected row
dropview-above-border-color
dropview-above-border-width
// theme of the drop view for CPDragOperationAbove on a selected row
dropview-above-selected-border-color
dropview-above-selected-border-width
Aristo and Aristo2 have been updated, and use the same old hardcoded values.
Without this fix, -CPView convertPoint:fromView was broken due to the changes made in #1998. In particular, the transform for the fromView would be calculated and then just thrown away if the views were in the same window. This happened to work in some specific cases and the lack of unit tests concealed the error.
This fix properly applies the transforms when two views are in the same window without one of them necessarily being inside the other.
Refs #1998.