]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/prntbase.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / common / prntbase.cpp
index a71fcb47a70d0e6b3e6f601bcd7553968b086f66..ce52bc53fd21da2a389966a763f4c3222cc646ba 100644 (file)
@@ -384,14 +384,21 @@ void wxPreviewControlBar::CreateButtons()
             "120%", "150%", "200%"
         };
 
-        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
-                                     wxPoint(x, y), wxSize(100, -1));
-                               
-        // Yes, this look stupid, but this is because gcc gives up otherwise.
         int n = WXSIZEOF(choices);
-// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now
-        for ( int i = 0; i < n; i++ )
-           m_zoomControl->Append(choices[i]);
+
+        wxString* strings = new wxString[n];
+        int i;
+        for (i = 0; i < n; i++ )
+           strings[i] = choices[i];
+
+        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
+                                     wxPoint(x, y),
+                                     wxSize(100, -1),
+                                     n,
+                                     strings
+                                    );
+        delete[] strings;
+
         SetZoomControl(m_printPreview->GetZoom());
     }