]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/gen_iface.py
changed wxImage::ComputeHistogram to use wxHashMap
[wxWidgets.git] / src / stc / gen_iface.py
index 04303b82023120d3a0bfe90c9cb79038dd1a9b56..4c7d15bcca5b44982c001f0682e805202806a382 100644 (file)
@@ -86,6 +86,11 @@ methodOverrideMap = {
 
                        '''wxString %s(int startPos, int endPos) {
                           wxString text;
+                          if (endPos < startPos) {
+                              int temp = startPos;
+                              startPos = endPos;
+                              endPos = temp;
+                          }
                           int len = endPos - startPos;
                           if (!len) return "";
                           TextRange tr;
@@ -266,6 +271,11 @@ methodOverrideMap = {
                                 wxRect pageRect) {
                             RangeToFormat fr;
 
+                            if (endPos < startPos) {
+                                int temp = startPos;
+                                startPos = endPos;
+                                endPos = temp;
+                            }
                             fr.hdc = draw;
                             fr.hdcTarget = target;
                             fr.rc.top = renderRect.GetTop();
@@ -324,6 +334,11 @@ methodOverrideMap = {
 
                       '''wxString %s(int startPos, int endPos) {
                             wxString text;
+                            if (endPos < startPos) {
+                                int temp = startPos;
+                                startPos = endPos;
+                                endPos = temp;
+                            }
                             int   len  = endPos - startPos;
                             if (!len) return "";
                             char* buff = text.GetWriteBuf(len);