Watches dialog column widths are not preserved when switching between default and debug perspectives and if default perspective has no visible watches window. This is very annoying and time consuming when periodically stopping debug session and starting it again, because property grid columns became small, aligns to the right and does not fit contents.
Such behavior is erratical when the watches dialog is docked.
Best way to reproduce the problem is following:
1. Open project.
2. Open watches window and make it floating.
3. Move splitters in the watches window anywhere you like.
4. Close watches window.
5. Open watches window again.
Expecting:
Column widths are same as before.
Actually:
Column widths are reset.
The reason of such behavior is that property grid control receives multiple resize event before actual show and each event has different size parameters and may be (-1,-1). Each resize event causes property grid column fitting into event size.
Provided patch prevents property grid automatic column fit.
Tested on Windows 7 with wxWidgets 2.8.
Even if user resizes some column to a size larger than watches window or screen width then all of columns will be restored by WatchesDlg constructor next time Code::Blocks starts.
Hm, can't reproduce on CentOS 6.6, wx2.8, rev 10148.
Last edit: Teodor Petrov 2015-04-16
But I think the bug happens on perspective change.
Do I need to have watches added or does the bug happen with an empty window?
If you can record a video with the steps it will be very helpful.
Last edit: Teodor Petrov 2015-04-16
Hm, your patch fixes the perspective change issue, but introduces some unpleasant behavior. Now resizing the middle column moves the sizer for the right column. I'm not sure I like this behavior.
You don't have to add watches. It's reproducible with empty window.
Yes, resizing first column moves other columns to the right, so other column sizes does not change. In a same way operate other windows which have listbox control with movable columns, e.g. Call Stack and Thread Search windows. So I believe such behavior change will not confuse most of users.
Unfortunaly, this bug is not easy to reproducible when Watches windows is docked.
I will try to make video, but not sure that can do it rapidly.
Please, see attached screenshots.
I would like to report that I am experiencing this bug on Windows 7, SVN 10320.
Here are my steps to reproduce it:
Applied in r10564. Thanks for the contribution.