Added separate SetFocusOnCanvas() function so that m_editorFocused will be more reliable updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1819,6 +1819,12 @@ protected:
|
|||||||
wxVariant* pValue = NULL,
|
wxVariant* pValue = NULL,
|
||||||
unsigned int selFlags = 0 );
|
unsigned int selFlags = 0 );
|
||||||
|
|
||||||
|
void SetFocusOnCanvas()
|
||||||
|
{
|
||||||
|
m_canvas->SetFocusIgnoringChildren();
|
||||||
|
m_editorFocused = 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool DoHideProperty( wxPGProperty* p, bool hide, int flags );
|
bool DoHideProperty( wxPGProperty* p, bool hide, int flags );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -3594,8 +3594,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
canvas->SetFocusIgnoringChildren();
|
SetFocusOnCanvas();
|
||||||
m_editorFocused = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3813,8 +3812,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// wxGTK atleast seems to need this (wxMSW not)
|
// Make sure focus is in grid canvas (important for wxGTK, at least)
|
||||||
canvas->SetFocusIgnoringChildren();
|
SetFocusOnCanvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorsValueWasNotModified();
|
EditorsValueWasNotModified();
|
||||||
@@ -3836,8 +3835,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Make sure focus is in grid
|
// Make sure focus is in grid canvas
|
||||||
canvas->SetFocusIgnoringChildren();
|
SetFocusOnCanvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
ClearInternalFlag(wxPG_FL_IN_SELECT_PROPERTY);
|
ClearInternalFlag(wxPG_FL_IN_SELECT_PROPERTY);
|
||||||
@@ -3906,7 +3905,7 @@ bool wxPropertyGrid::UnfocusEditor()
|
|||||||
if ( !CommitChangesFromEditor(0) )
|
if ( !CommitChangesFromEditor(0) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_canvas->SetFocusIgnoringChildren();
|
SetFocusOnCanvas();
|
||||||
DrawItem(m_selected);
|
DrawItem(m_selected);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -4227,7 +4226,7 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
|
|||||||
// Need to set focus?
|
// Need to set focus?
|
||||||
if ( !(m_iFlags & wxPG_FL_FOCUSED) )
|
if ( !(m_iFlags & wxPG_FL_FOCUSED) )
|
||||||
{
|
{
|
||||||
m_canvas->SetFocusIgnoringChildren();
|
SetFocusOnCanvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPropertyGridPageState* state = m_pState;
|
wxPropertyGridPageState* state = m_pState;
|
||||||
|
Reference in New Issue
Block a user