Fix wxSTC compilation without wxUSE_DRAG_AND_DROP after r65827.
Correct the changes of r65827 to also compile with wxUSE_DRAG_AND_DROP==0 (especially important for the ports without dnd support such as wxX11 and wxDFB). Also do the changes in the correct files, i.e. src/stc/stc.{h,cpp}.in and not in the generated files themselves to prevent them from being overwritten the next time gen_iface.py is ran. Finally keep backwards compatibility as SetDragAllowMove(bool) is a public method so preserve its old semantics and add a new SetDragFlags() instead of silently breaking the existing code using SetDragAllowMove(). See #11709. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -595,7 +595,7 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp)
|
||||
buff[len] = 0;
|
||||
SendMsg(2049, markerNumber, (sptr_t)buff);
|
||||
delete [] buff;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Add a set of markers to a line.
|
||||
@@ -1190,7 +1190,7 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) {
|
||||
buff[len] = 0;
|
||||
SendMsg(2405, type, (sptr_t)buff);
|
||||
delete [] buff;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Clear all the registered images.
|
||||
@@ -4573,8 +4573,8 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
|
||||
m_listType = 0;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
m_dragAllowMove = wxDrag_CopyOnly;
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
m_dragFlags = wxDrag_CopyOnly;
|
||||
m_dragResult = wxDragNone;
|
||||
#endif
|
||||
}
|
||||
@@ -4608,9 +4608,9 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
|
||||
m_x = event.m_x;
|
||||
m_y = event.m_y;
|
||||
|
||||
m_dragText = event.m_dragText;
|
||||
m_dragAllowMove =event.m_dragAllowMove;
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
m_dragText = event.m_dragText;
|
||||
m_dragFlags = event.m_dragFlags;
|
||||
m_dragResult = event.m_dragResult;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user