Don't set column title if wxPG header is going to be hidden
wxPropertyGridManager::SetColumnTitle() shouldn't be called when we going to hide the header because it makes the header visible.
This commit is contained in:
parent
0ee25cce3a
commit
54c5584c65
@ -2703,8 +2703,12 @@ void FormMain::OnEnableLabelEditing(wxCommandEvent& event)
|
||||
#if wxUSE_HEADERCTRL
|
||||
void FormMain::OnShowHeader( wxCommandEvent& event )
|
||||
{
|
||||
m_pPropGridManager->ShowHeader(event.IsChecked());
|
||||
m_pPropGridManager->SetColumnTitle(2, wxT("Units"));
|
||||
bool show = event.IsChecked();
|
||||
m_pPropGridManager->ShowHeader(show);
|
||||
if ( show )
|
||||
{
|
||||
m_pPropGridManager->SetColumnTitle(2, wxT("Units"));
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_HEADERCTRL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user