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:
@@ -2703,8 +2703,12 @@ void FormMain::OnEnableLabelEditing(wxCommandEvent& event)
|
|||||||
#if wxUSE_HEADERCTRL
|
#if wxUSE_HEADERCTRL
|
||||||
void FormMain::OnShowHeader( wxCommandEvent& event )
|
void FormMain::OnShowHeader( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
m_pPropGridManager->ShowHeader(event.IsChecked());
|
bool show = event.IsChecked();
|
||||||
m_pPropGridManager->SetColumnTitle(2, wxT("Units"));
|
m_pPropGridManager->ShowHeader(show);
|
||||||
|
if ( show )
|
||||||
|
{
|
||||||
|
m_pPropGridManager->SetColumnTitle(2, wxT("Units"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // wxUSE_HEADERCTRL
|
#endif // wxUSE_HEADERCTRL
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user