Disable scrollbars for frozen wxTreeCtrl in MSW
Replace the hack with resizing the control to the minimal possible size while it's frozen with just disabling its scrollbars in the frozen state. This should also fix the original problem (of scrollbar jumping around wildly as the items are added), but without different problems due to the control being resized unexpectedly. Unfortunately we don't have a reproducer for the original problem, which the commits6754c300cf
("Freeze wxTreeCtrl in wxMSW by hiding it") and4e1e8dc51b
("Change wxMSW wxTreeCtrl::DoFreeze() to not hide the tree any more" -- but resize it instead) tried to fix, so it's difficult to be sure that it really doesn't exist any more, but it does seem like it ought to be as the comment added back then spoke of the problem with scrollbar updating and this really shouldn't happen if scrollbars are completely disabled. See https://github.com/wxWidgets/wxWidgets/pull/375
This commit is contained in:
@@ -207,10 +207,6 @@ protected:
|
||||
virtual void DoFreeze() wxOVERRIDE;
|
||||
virtual void DoThaw() wxOVERRIDE;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
|
||||
|
||||
virtual bool MSWShouldSetDefaultFont() const wxOVERRIDE { return false; }
|
||||
|
||||
// SetImageList helper
|
||||
@@ -336,9 +332,6 @@ private:
|
||||
// whether we need to deselect other items on mouse up
|
||||
bool m_mouseUpDeselect;
|
||||
|
||||
// The size to restore the control to when it is thawed, see DoThaw().
|
||||
wxSize m_thawnSize;
|
||||
|
||||
friend class wxTreeItemIndirectData;
|
||||
friend class wxTreeSortHelper;
|
||||
|
||||
|
Reference in New Issue
Block a user