Deleting last grid rows or column in a few event handlers could result
in asserts/crashes in wxGrid code if the event handler also called
event.Skip(), as wxGrid still tried to perform the default action using
the deleted cell, when these events happened in the last row or column.
It's not totally clear whether calling event.Skip() after performing an
action modifying the grid should be allowed at all, but, in doubt, at
least avoid crashing if it does happen, by considering the event as
being handled (and even vetoed) if its handler deleted the cell in which
it was generated.
Closes#18731.
Move the logic determining the return value of SendEvent() into its own
function instead of repeating it twice.
No real changes, this is a pure refactoring.
In addition to the current methods to add/delete one item to the control
we would need a method to replace all existing control items with new ones
at once.
Calling FindFirst() with an URL without wildcards returned the correct
result, but didn't reset m_findIter, which kept its value from the
previous search that could have been invalidated since then, e.g. if
RemoveFile() has been called. Using this value could result in a crash
during the next call to FindNext().
Fix this by ensuring that we always reset m_findIter to the valid (even
if pointing to the end) value as the first thing we do in FindFirst().
Closes#18744.
Use CATCH macros directly and define separate test cases instead of
using a useless FileSystemTestCase class.
Also add INFO() macros to provide information about the context in case
of test failure.
No real changes.
This is more correct as saving the current width of the last column
would prevent the user from shrinking it under the last automatically
set size, i.e. the UI behaviour would change after restarting the
program, which shouldn't be the case.
Doing this required making WXGetManuallySetWidth(), which previously
existed in the generic version only, available in all ports, so do it
and also rename it to WXGetSpecifiedWidth() in the process, as this
seems a somewhat better name (it doesn't have to be manually specified,
i.e. it could also be done by the program itself or even implicitly by
wxPersistentDataViewCtrl).
Don't make this function public, at least for now, because it's not
clear how could it be useful and it might still need to be changed to
behave differently in the other ports.
This fix for disallowing shrinking the last column to nothing instead of
showing horizontal scrollbar when it became smaller than its minimum
size was wrong and is not necessary any more after the correct fix in
the previous commit.
This effectively reverts 0c90ea40c3 (Don't auto-resize wxDataViewCtrl
columns below their initial size, 2019-10-03).
See #18343.
Columns without any explicitly specified width still shouldn't be shrunk
down to 0 size by UpdateColumnSizes(), so handle them as if they were
created using wxDVC_DEFAULT_WIDTH instead -- which is what their actual
width is/would be.
This is a better fix than the one in 0c90ea40c3 (Don't auto-resize
wxDataViewCtrl columns below their initial size, 2019-10-03) and that
commit can be reverted now, as will be done soon.
See #18343.
Not doing this when the last column size should have been exactly equal
to its manually set size resulted in showing the horizontal scrollbar
unnecessarily.
Using too high precision could result in bogus digits appearing in the
displayed value, e.g. 0.058 shown in percents (with a factor of 100)
appeared as 5.800000000000001 before this change.
This is now done automatically in the GitHub action of wxWidgets/website
repository.
Do mention that rebuilding the web site requires the release to be
available.
This is more user-friendly than GitHub links with their tons of files.
Also use the recently added #vX.Y.Z_msw anchor to link directly to MSW
binaries downloads from the corresponding file.
Closes https://github.com/wxWidgets/wxWidgets/pull/1820
Upgrade the submodule to a version which doesn't try to use SSE2 with
this old compiler, as it doesn't support the required intrinsics.
See https://github.com/wxWidgets/libpng/pull/4
This works around a problem in our build system which doesn't set rpath
correctly when linking our own libraries, which means that "qa" library,
for example, doesn't record the path to its "xml" library dependency.
We already worked around this by linking any program using "qa" with
"xml" too, however this doesn't do anything if "--as-needed" flag is in
effect, as is the case by default under Ubuntu 18.04, so make our
workaround work by forcefully disabling this flag.
Real solution would be to use -Wl,-rpath correctly and then stop linking
with "xml" library unnecessarily in e.g. test_gui bakefile.