]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/studio/view.cpp
Layout fixes for wxPlotWindow [#1192416] + source cleaning to the wxW 2.6 coding...
[wxWidgets.git] / contrib / samples / ogl / studio / view.cpp
index f3073fc44a521952eda26724d692da84251b0506..9fac0a9b072f883d00c149662751e3283ae4008d 100644 (file)
@@ -853,7 +853,7 @@ csCanvas::~csCanvas(void)
 
 void csCanvas::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
 {
-    wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+    wxPen dottedPen(*wxBLACK, 1, wxDOT);
     dc.SetPen(dottedPen);
     dc.SetBrush(* wxTRANSPARENT_BRUSH);
 
@@ -877,6 +877,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys))
 
     if (palette->GetSelection() == PALETTE_TEXT_TOOL)
     {
+        wxString newLabel;
+
+#if wxUSE_WX_RESOURCES
         // Ask for a label and create a new free-floating text region
         csLabelEditingDialog* dialog = new csLabelEditingDialog(GetParent());
 
@@ -888,8 +891,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys))
             return;
         }
 
-        wxString newLabel = dialog->GetShapeLabel();
+        newLabel = dialog->GetShapeLabel();
         dialog->Destroy();
+#endif // wxUSE_WX_RESOURCES
 
         wxShape* shape = new csTextBoxShape;
         shape->AssignNewIds();