Fix repositioning of active property editor in wxPG
When there is open an editor for some property and in the same time wxPropertyGrid layout is changed (due to the adding or removing a property, sorting), it is necessary to recalculate the actual position of the active editor to display it in the cell dedicated for the edited property. Under some platforms the position of the edit control is shifted within the cell and we have to take this shift into account in repositioning process. Because actual value of the shift depends on the platform and on the particular control, it is convenient to determine actual shift when the editor is created and use this value whenever repositioning is done. Close #17912.
This commit is contained in:
@@ -1465,6 +1465,9 @@ protected:
|
||||
// wxWindow pointers to editor control(s).
|
||||
wxWindow *m_wndEditor;
|
||||
wxWindow *m_wndEditor2;
|
||||
// Actual positions of the editors within the cell.
|
||||
wxPoint m_wndEditorPosRel;
|
||||
wxPoint m_wndEditor2PosRel;
|
||||
|
||||
wxBitmap *m_doubleBuffer;
|
||||
|
||||
@@ -1644,8 +1647,9 @@ protected:
|
||||
// pointer to property that has mouse hovering
|
||||
wxPGProperty* m_propHover;
|
||||
|
||||
// Active label editor
|
||||
// Active label editor and its actual position within the cell
|
||||
wxTextCtrl* m_labelEditor;
|
||||
wxPoint m_labelEditorPosRel;
|
||||
|
||||
// For which property the label editor is active
|
||||
wxPGProperty* m_labelEditorProperty;
|
||||
|
Reference in New Issue
Block a user