Restore text drag-and-drop in wxSTC broken by Scintilla 2 update.
Drag and drop in wxStyledTextCtrl was broken, apparently since upgrade to Scintilla 2. Restore it by using the correct wxDrag_XXX constants instead of boolean values in the code for wxEVT_STC_START_DRAG events generation. Closes #11709. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dd5ab30d6a
commit
676184202d
@ -416,6 +416,7 @@ All (GUI):
|
||||
- Consistency fixes for keyboard events across all major ports.
|
||||
- Added EVT_RIBBONBAR_TAB_LEFT_DCLICK event (snowleopard).
|
||||
- Fix display of right aligned columns in wxGenericListCtrl (jl).
|
||||
- Restore text drag-and-drop in wxSTC broken by Scintilla 2 update (Jens Lody).
|
||||
|
||||
MSW:
|
||||
|
||||
|
@ -4326,7 +4326,7 @@ public:
|
||||
void SetX(int val) { m_x = val; }
|
||||
void SetY(int val) { m_y = val; }
|
||||
void SetDragText(const wxString& val) { m_dragText = val; }
|
||||
void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
|
||||
void SetDragAllowMove(int val) { m_dragAllowMove = val; }
|
||||
#ifdef STC_USE_DND
|
||||
void SetDragResult(wxDragResult val) { m_dragResult = val; }
|
||||
#endif
|
||||
@ -4349,7 +4349,7 @@ public:
|
||||
int GetX() const { return m_x; }
|
||||
int GetY() const { return m_y; }
|
||||
wxString GetDragText() { return m_dragText; }
|
||||
bool GetDragAllowMove() { return m_dragAllowMove; }
|
||||
int GetDragAllowMove() { return m_dragAllowMove; }
|
||||
#ifdef STC_USE_DND
|
||||
wxDragResult GetDragResult() { return m_dragResult; }
|
||||
#endif
|
||||
@ -4387,7 +4387,7 @@ private:
|
||||
int m_y;
|
||||
|
||||
wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
|
||||
bool m_dragAllowMove; // wxEVT_STC_START_DRAG
|
||||
int m_dragAllowMove; // wxEVT_STC_START_DRAG
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
|
||||
|
@ -283,7 +283,7 @@ void ScintillaWX::StartDrag() {
|
||||
wxStyledTextEvent evt(wxEVT_STC_START_DRAG, stc->GetId());
|
||||
evt.SetEventObject(stc);
|
||||
evt.SetDragText(dragText);
|
||||
evt.SetDragAllowMove(true);
|
||||
evt.SetDragAllowMove(wxDrag_DefaultMove);
|
||||
evt.SetPosition(wxMin(stc->GetSelectionStart(),
|
||||
stc->GetSelectionEnd()));
|
||||
stc->GetEventHandler()->ProcessEvent(evt);
|
||||
|
@ -4573,7 +4573,7 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
|
||||
m_listType = 0;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
m_dragAllowMove = false;
|
||||
m_dragAllowMove = wxDrag_CopyOnly;
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
m_dragResult = wxDragNone;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user