This is needed so qt mouse events are triggered without a button pressed.
Note that I modified this to prevent a crash if m_qtWindow was null (reproducible with controls sample and the original patch from Sean)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is possible to receive more than one TaskbarButtonCreated message for the
same window, so at the very least don't leak memory if this happens.
We really ought to notify the application to allow it to reinitialize the
taskbar button in this case though.
See #16566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If we specify the horizontal alignment, we also need to specify the vertical
alignment as otherwise the right-aligned columns would be also top-aligned,
looking out of kilter with the other columns which are centered by default.
Closes#16559.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes the code (slightly) shorter and more clear and is more efficient as
selecting all items in wxDataViewCtrl is now a O(1) operation instead of being
O(N), where N is the number of items -- and the latter could take quite a long
time (and consume non-negligible amount of memory) for large N.
Increase the size of the virtual list control from 1000 to 10000000 in the
sample to show this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.
This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just don't make SelectRows() more complicated than necessary:
it is always called with its arguments in order, so it doesn't need to reorder
them and it is never called to deselect the items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Shift clicking in a control with multiple selections without a previous
current row attempted to select all rows from the current one up to UINT_MAX
which resulted in a program freezing (and probably running out of memory in 64
bit builds).
Fix this by explicitly checking for the absence of the current item.
Closes#16582.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Local time zone already logically includes DST, even if its offset doesn't
account for it (because the offset depends on the date, so it can't be part of
TZ itself), so don't add it again when converting to/from it.
Closes#16585.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r76824 as it is not necessary any longer, the fix in the previous
commit takes care of this problem more generally.
See #16365.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There doesn't seem to be any advantage in doing this, but it can result in
problems see #16055. So just always let the other handlers for this event
execute as well, even if we did process it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was unexpected and resulted in a crash in the case of wxDatePickerCtrl.
And while this particular crash could be fixed just by checking for the
pointers validity in the overridden wxDatePickerCtrl::SetSize(), it seems
better to avoid such unexpected calls to SetSize(), especially as they only
happen under wxGTK, which calls SetLayoutDirection(wxLayout_Default) from its
wxWindow::Create(), and so wouldn't be found by any amount of testing under
other platforms.
Closes#16589.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state because this operation (wxPG::OnValidationFailureReset) also resets pending value.
Closes#16587
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxOSX's implementation used a shared global delegate for all toolbars,
which is not only highly unusual, but broke with code that modified the
delegate. Specifically, wxPreferencesEditor's window uses
OSXSetSelectableTools() to make its toolbar selectable. Because the
delegate was shared, all toolbars in the application would start
behaving as selectable as soon as the user opened preferences (even
after the preferences window was closed).
Don't share the delegate. Create a unique copy and store it in
wxNSToolbar instance. This isn't particularly elegant solution, but it
has the advantage of being binary compatible and simple.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Actually use gray background behind toggled icon. Remove the ugly black
frame. Increase rounded rectangle's radius so that it is (barely)
visible that the rectangle is rounded.
Previously, the code used wxLIGHT_GREY by mistake, which is the same
color as the toolbar already uses, so toggled items were rendered with
the same background as untoggled, only with an ugly black rectangle
around them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775