Mac: Update column width when expanding/collapsing
Adjust autosizing columns of wxDataViewCtrl when items are expanded
or collapsed through the UI as well.
Complements commit e89e76bb82
.
See #14939.
See #19003.
This commit is contained in:
committed by
Dimitri Schoolwerth
parent
9a78bfb553
commit
9ee866551f
@@ -1643,6 +1643,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
currentlyEditedColumn =
|
currentlyEditedColumn =
|
||||||
currentlyEditedRow = -1;
|
currentlyEditedRow = -1;
|
||||||
|
|
||||||
|
[self setAutoresizesOutlineColumn:NO];
|
||||||
[self registerForDraggedTypes:[NSArray arrayWithObjects:DataViewPboardType,NSStringPboardType,nil]];
|
[self registerForDraggedTypes:[NSArray arrayWithObjects:DataViewPboardType,NSStringPboardType,nil]];
|
||||||
[self setDelegate:self];
|
[self setDelegate:self];
|
||||||
[self setDoubleAction:@selector(actionDoubleClick:)];
|
[self setDoubleAction:@selector(actionDoubleClick:)];
|
||||||
@@ -1900,6 +1901,8 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
[[notification userInfo] objectForKey:@"NSObject"]);
|
[[notification userInfo] objectForKey:@"NSObject"]);
|
||||||
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSED, dvc, item);
|
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSED, dvc, item);
|
||||||
dvc->GetEventHandler()->ProcessEvent(event);
|
dvc->GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
|
dvc->AdjustAutosizedColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) outlineViewItemDidExpand:(NSNotification*)notification
|
-(void) outlineViewItemDidExpand:(NSNotification*)notification
|
||||||
@@ -1910,6 +1913,8 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
[[notification userInfo] objectForKey:@"NSObject"]);
|
[[notification userInfo] objectForKey:@"NSObject"]);
|
||||||
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDED, dvc, item);
|
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDED, dvc, item);
|
||||||
dvc->GetEventHandler()->ProcessEvent(event);
|
dvc->GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
|
dvc->AdjustAutosizedColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) outlineViewSelectionDidChange:(NSNotification*)notification
|
-(void) outlineViewSelectionDidChange:(NSNotification*)notification
|
||||||
|
Reference in New Issue
Block a user