Fix wxPropertyGrid compilation when wxUSE_TOOLBAR==0
Don't use toolbar associated with wxPG in this case.
This commit is contained in:
@@ -459,9 +459,11 @@ public:
|
|||||||
return m_pPropGrid->GetSelection();
|
return m_pPropGrid->GetSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_TOOLBAR
|
||||||
/** Returns a pointer to the toolbar currently associated with the
|
/** Returns a pointer to the toolbar currently associated with the
|
||||||
wxPropertyGridManager (if any). */
|
wxPropertyGridManager (if any). */
|
||||||
wxToolBar* GetToolBar() const { return m_pToolbar; }
|
wxToolBar* GetToolBar() const { return m_pToolbar; }
|
||||||
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
/** Creates new property page. Note that the first page is not created
|
/** Creates new property page. Note that the first page is not created
|
||||||
automatically.
|
automatically.
|
||||||
|
@@ -1409,6 +1409,7 @@ void wxPropertyGridManager::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
|||||||
|
|
||||||
if ( HasExtraStyle(wxPG_EX_TOOLBAR_SEPARATOR) )
|
if ( HasExtraStyle(wxPG_EX_TOOLBAR_SEPARATOR) )
|
||||||
{
|
{
|
||||||
|
#if wxUSE_TOOLBAR
|
||||||
if (m_pToolbar && m_pPropGrid)
|
if (m_pToolbar && m_pPropGrid)
|
||||||
{
|
{
|
||||||
wxPen marginPen(m_pPropGrid->GetMarginColour());
|
wxPen marginPen(m_pPropGrid->GetMarginColour());
|
||||||
@@ -1417,6 +1418,7 @@ void wxPropertyGridManager::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
|||||||
int y = m_pPropGrid->GetPosition().y-1;
|
int y = m_pPropGrid->GetPosition().y-1;
|
||||||
dc.DrawLine(0, y, GetClientSize().x, y);
|
dc.DrawLine(0, y, GetClientSize().x, y);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_TOOLBAR
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repaint splitter and any other description box decorations
|
// Repaint splitter and any other description box decorations
|
||||||
|
Reference in New Issue
Block a user