From 8dd2ac3016015e0adde049d3b2098a49c9b7bda6 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 1 Aug 2017 20:47:28 +0200 Subject: [PATCH] Implement DragAcceptFiles() only when wxUSE_DRAG_AND_DROP==1 This virtual method is implemented in wxWindowBase class only when wxUSE_DRAG_AND_DROP==1, so it should be re-implemented in the derived class wxWindowMac also only when wxUSE_DRAG_AND_DROP==1. --- include/wx/osx/window.h | 2 +- src/osx/window_osx.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 192c420eaf..7db20f4810 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -122,10 +122,10 @@ public: #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE; -#endif // Accept files for dragging virtual void DragAcceptFiles( bool accept ) wxOVERRIDE; +#endif // implementation from now on // -------------------------- diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index aea8abb0fd..823c0beae8 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -639,13 +639,12 @@ void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget) GetPeer()->SetDropTarget(m_dropTarget) ; } -#endif - // Old-style File Manager Drag & Drop void wxWindowMac::DragAcceptFiles(bool WXUNUSED(accept)) { // TODO: } +#endif // From a wx position / size calculate the appropriate size of the native control