Paul Cornett
ff5d764b63
Simplify conditional expression
...
!A || (A && B) --> !A || B
2019-02-17 22:49:58 -08:00
Paul Cornett
7c75f46098
wxOVERRIDE
2019-02-17 22:42:26 -08:00
Paul Cornett
3b8404ce48
Avoid potential buffer overrun
...
Need to allow for terminating nul
2019-02-17 22:32:40 -08:00
Paul Cornett
36f742e2e7
Avoid pointless bitwise operation on a bool
2019-02-17 22:28:44 -08:00
Paul Cornett
66f88e401e
Avoid potential memory leaks
2019-02-17 22:26:36 -08:00
Paul Cornett
123b96e214
Avoid potential 31-bit shift of signed 32-bit value
2019-02-17 22:22:08 -08:00
Paul Cornett
0cb9231720
Avoid shifting negative value
2019-02-17 22:20:50 -08:00
Paul Cornett
71972a5265
Use pre-increment operator with iterators
2019-02-17 18:48:40 -08:00
Paul Cornett
360342659b
Remove unimplemented wxListBase ctor declaration
2019-02-17 18:26:17 -08:00
Paul Cornett
ad59df7355
Remove unuseable wxListBase ctor
...
It calls Append(void*), which calls the pure virtual CreateNode(), which will
crash, as the required override can't be called from the base class ctor.
2019-02-17 18:19:16 -08:00
Paul Cornett
c41ff4e694
Remove unuseable wxPGArrayEditorDialog ctor
...
It calls Create(), which calls the pure virtual ArrayGetCount(), which will
crash, as the required override can't be called from the base class ctor.
2019-02-17 18:00:26 -08:00
Paul Cornett
9ea2ac92ef
Fix wxCriticalSectionLocker usage
...
A temporary object will not hold the lock
2019-02-17 17:24:36 -08:00
Pavel Kalugin
be12bc6a8a
Fix selection in generic wxDataViewCtrl after adding an item
...
Notify m_selection about the new item in all cases, not just when using
a virtual list model.
This was broken back in 36a5983f64
and
only fixed for virtual list controls, but not all the other ones, in
9f5af0a494
.
2019-02-15 14:39:13 +01:00
Cătălin Răceanu
be9c18cbd6
Reuse Qt implementation of normal button for toggle buttons
2019-02-13 01:23:20 +02:00
Cătălin Răceanu
7be9c8c670
Remove functions that are identical with the ones in base classes
2019-02-13 01:15:19 +02:00
Cătălin Răceanu
50edbf24cc
Change the base class of wxBitmapToggleButton
2019-02-13 01:09:16 +02:00
Cătălin Răceanu
39c9992ec9
Remove declaration already present in common code
2019-02-13 00:58:54 +02:00
Cătălin Răceanu
193cf3fee9
Change the order of class declarations only
2019-02-13 00:55:00 +02:00
Tim Kosse
dd56499fe9
Fix crashes when pasting non-text data in wxOSX
...
Check that conversions succeed before using their results to avoid
crashing if the data on clipboard is in an unexpected format.
Closes #18344 .
2019-02-12 16:19:18 +01:00
Graham Dawes
b9382b99b4
Ensure wxTreeCtrl::DoHitTest updates flag when item is successfully hit.
2019-02-12 08:47:29 +00:00
Graham Dawes
78280428e9
Replace use of QTreeWidget::setIcon and QTreeWidget::iconChanged with code that is compatible with our minimum suppported QT version
2019-02-12 08:15:47 +00:00
Catalin Raceanu
fb00507fb5
Implement image support for button states in wxQt
...
Closes https://github.com/wxWidgets/wxWidgets/pull/1224
2019-02-11 19:34:26 +01:00
Graham Dawes
6ead20624a
Fix wxQT wxTreeCtrl drawing issues under Linux
2019-02-11 13:50:55 +00:00
Graham Dawes
8141586102
Correct restoration of tree icon logic
2019-02-11 13:00:42 +00:00
Graham Dawes
8ab2d9c944
Fix incorrect icon being drawn in wxTreeCtrl
2019-02-11 09:08:43 +00:00
Graham Dawes
d0f71da55b
Fix build warning
2019-02-11 08:15:37 +00:00
Graham Dawes
5d2663432e
Delete child items in wxTreeCtrl::Delete under wxQT
2019-02-11 08:14:25 +00:00
Vadim Zeitlin
bf515d769a
Fix size of text drawing using wxGraphicsContext when printing
...
When using both wxEnhMetaFileDC (used for print preview) and
wxPrinterDC, a global scale factor was applied to the graphics context
in wxGDIPlusPrintingContext ctor and this changes size of the text
rendered using size specified in point units.
To prevent this from happening, stop applying this scale factor in the
base class GetTextExtent() and apply it instead when setting fonts in
the derived wxGDIPlusPrintingContext only. This ensures that the results
are consistent between GetTextExtent() and DrawText() and also keeps
the font scale hack entirely in wxGDIPlusPrintingContext without
affecting the base class.
It's still not totally clear why do we have to do this at all even
although we specify the font sizes in UnitPoint units which ought to be
DPI-independent -- but somehow are not. But at least the output is
correct now and the code is arguably more clear than before.
This fixes a regression with text size when printing or previewing
introduced by d5020362ff
Closes #18338 .
2019-02-08 16:49:38 +01:00
Vadim Zeitlin
21661d51d8
Remove unnecessary wxGDIPlusPrintingContext dtor
...
No real changes.
2019-02-08 16:16:02 +01:00
Graham Dawes
6482664955
Fix build errors when building with gcc
2019-02-08 14:43:04 +00:00
Jay Nabonne
6014eb37ea
Fix some stylistic and wxT issues.
2019-02-08 14:04:27 +00:00
Jay Nabonne
8844e16b03
Fix new header.
2019-02-08 14:03:32 +00:00
Jay Nabonne
4cfc55add8
Fix tab/spacing
2019-02-08 13:53:21 +00:00
Jay Nabonne
5e28b51a66
Create a simple implementation of GetBoundingRect.
2019-02-08 11:33:29 +00:00
Jay Nabonne
b0af9a12b6
Mark a virtual function override as such.
2019-02-08 11:32:53 +00:00
Jay Nabonne
b7ff45799c
Clean up file.
2019-02-08 10:57:08 +00:00
Jay Nabonne
99e7da303e
Clean up code before pull request..
2019-02-07 17:37:14 +00:00
Jay Nabonne
23f6be20c8
Fix SetItemBackgroundColour.
2019-02-07 17:14:13 +00:00
Jay Nabonne
2a7d0eebcc
Implement "hide root" properly.
2019-02-07 16:26:39 +00:00
Graham Dawes
b96cc406f4
Don't add item to tree until its fully constructed (prevents itemChanged signal from firing).
2019-02-07 14:24:52 +00:00
Graham Dawes
3d89c1e9e8
Set old tree item for selection change events.
2019-02-07 14:22:21 +00:00
Graham Dawes
8c87a43f18
Place holder image is only generated once..
2019-02-07 14:04:21 +00:00
Graham Dawes
281673a584
Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt_tree_control
2019-02-07 13:49:17 +00:00
Graham Dawes
d597787270
Store item state in wxTreeCtrl for wxQT
2019-02-07 13:46:20 +00:00
Graham Dawes
d8c3a14eee
Generate wxEVT_TREE_END_LABEL_EDIT when the user has finished editing an item in wxTreeCtrl
2019-02-07 13:34:10 +00:00
Jay Nabonne
9566143b58
Get rid of logic error - no need for state variables and all that, by just doing things at the right time.
...
This fixes the problem of the mouse position being wrong during endDrag.
2019-02-07 12:05:34 +00:00
Jay Nabonne
d3033c861c
Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt_tree_control
2019-02-07 11:40:28 +00:00
Jay Nabonne
6dfc243b27
Fix up a comment.
2019-02-07 11:39:26 +00:00
Jay Nabonne
541e7af374
Fix wx drag events to actually be keyed off of the Qt dragging state instead of its "drop" events.
...
Add "dropped" state to track whether a drop actually occurred or whether the drag ended unsuccessfully.
2019-02-07 11:36:15 +00:00
Graham Dawes
5aba98353c
Generate event when begin editing tree item.
2019-02-07 10:27:51 +00:00