From 2345bc4d0e11b5bad68a0ee2633caab633b36485 Mon Sep 17 00:00:00 2001
From: Thomas Goyne <plorkyeran@aegisub.org>
Date: Sat, 23 Aug 2014 15:44:21 -0700
Subject: [PATCH] Update wx

Removes the need for the RTL hacks in BaseGrid as the bugs have been
fixed properly in wx.
---
 .gitmodules       |  2 +-
 src/base_grid.cpp | 35 +----------------------------------
 vendor/wxWidgets  |  2 +-
 3 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index d06d3932c..a83654968 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,7 +4,7 @@
 	ignore = dirty
 [submodule "wxWidgets"]
 	path = vendor/wxWidgets
-	url = git://github.com/wxWidgets/wxWidgets.git
+	url = git://github.com/Aegisub/wxWidgets.git
 	ignore = dirty
 [submodule "googletest"]
 	path = vendor/googletest
diff --git a/src/base_grid.cpp b/src/base_grid.cpp
index 0a6265cc1..bedc9e775 100644
--- a/src/base_grid.cpp
+++ b/src/base_grid.cpp
@@ -54,39 +54,6 @@
 #include <wx/scrolbar.h>
 #include <wx/sizer.h>
 
-namespace {
-#ifdef __WXMSW__
-class PaintDC : public wxBufferedDC {
-	wxPaintDC dc;
-
-public:
-	PaintDC(wxWindow *window) : dc(window) {
-		dc.SetLayoutDirection(wxLayout_LeftToRight);
-		Init(&dc, window->GetClientSize(), 0);
-		if (window->GetLayoutDirection() == wxLayout_RightToLeft) {
-			SetLayoutDirection(wxLayout_RightToLeft);
-			SetLogicalOrigin(GetSize().GetWidth(), 0);
-		}
-	}
-
-	~PaintDC() {
-		SetLayoutDirection(wxLayout_LeftToRight);
-		SetLogicalOrigin(0, 0);
-		UnMask();
-	}
-
-	void Clear() {
-		auto origin = GetLogicalOrigin();
-		SetLogicalOrigin(0, 0);
-		wxBufferedDC::Clear();
-		SetLogicalOrigin(origin.x, origin.y);
-	}
-};
-#else
-typedef wxAutoBufferedPaintDC PaintDC;
-#endif
-}
-
 enum {
 	GRID_SCROLLBAR = 1730,
 	MENU_SHOW_COL = 1250 // Needs 15 IDs after this
@@ -319,7 +286,7 @@ void BaseGrid::OnPaint(wxPaintEvent &) {
 	GetClientSize(&w,&h);
 	w -= scrollBar->GetSize().GetWidth();
 
-	PaintDC dc(this);
+	wxAutoBufferedPaintDC dc(this);
 	dc.SetFont(font);
 
 	dc.SetBackground(row_colors.Default);
diff --git a/vendor/wxWidgets b/vendor/wxWidgets
index be35fb7a1..7df5d5a90 160000
--- a/vendor/wxWidgets
+++ b/vendor/wxWidgets
@@ -1 +1 @@
-Subproject commit be35fb7a15e8817ecd898ae9558e222ed63e572b
+Subproject commit 7df5d5a901abb0f34e226d2c9acee94c378f634a
-- 
GitLab