]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/src/divided.cpp
Made wxNO_DEFAULT set the "no" button as the default, according to the docs
[wxWidgets.git] / utils / ogl / src / divided.cpp
index 73fbe834345d95003f0b9639ac107fab6ec6f0f7..ba8cd615ac9696ffc609d67fa04ef9978c57d87d 100644 (file)
@@ -24,9 +24,7 @@
 #include <wx/wx.h>
 #endif
 
-#ifdef PROLOGIO
 #include <wx/wxexpr.h>
-#endif
 
 #include "basic.h"
 #include "basicp.h"
@@ -83,7 +81,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
   double leftX = (double)(m_xpos - (m_width / 2.0));
   double rightX = (double)(m_xpos + (m_width / 2.0));
 
-  if (m_pen) dc.SetPen(m_pen);
+  if (m_pen) dc.SetPen(m_pen);
 
   if (m_textColour) dc.SetTextForeground(* m_textColour);
 
@@ -110,7 +108,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
   while (node)
   {
     wxShapeRegion *region = (wxShapeRegion *)node->Data();
-    dc.SetFont(region->GetFont());
+    dc.SetFont(region->GetFont());
     dc.SetTextForeground(* region->GetActualColourObject());
 
     double proportion =
@@ -130,7 +128,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc)
       wxPen *regionPen = region->GetActualPen();
       if (regionPen)
       {
-        dc.SetPen(regionPen);
+        dc.SetPen(regionPen);
         dc.DrawLine(WXROUND(leftX), WXROUND(y), WXROUND(rightX), WXROUND(y));
       }
     }
@@ -186,7 +184,7 @@ bool wxDividedShape::GetAttachmentPosition(int attachment, double *x, double *y,
   wxLineShape *line)
 {
   int totalNumberAttachments = (GetRegions().Number() * 2) + 2;
-  if (!GetAttachmentMode() || (attachment >= totalNumberAttachments))
+  if ((GetAttachmentMode() == ATTACHMENT_MODE_NONE) || (attachment >= totalNumberAttachments))
   {
     return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs);
   }