if (m_pen) dc.SetPen(* m_pen);
- if (m_textColour) dc.SetTextForeground(* m_textColour);
+ dc.SetTextForeground(m_textColour);
#ifdef __WXMSW__
// For efficiency, don't do this under X - doesn't make
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
dc.SetFont(* region->GetFont());
- dc.SetTextForeground(* region->GetActualColourObject());
+ dc.SetTextForeground(region->GetActualColourObject());
double proportion =
region->m_regionProportionY < 0.0 ? defaultProportion : region->m_regionProportionY;
// Left or right.
else
{
- int i = 0;
- bool isLeft = FALSE;
- if (attachment < (n+1))
- {
- i = attachment-1;
- isLeft = FALSE;
- }
- else
- {
- i = (totalNumberAttachments - attachment - 1);
- isLeft = TRUE;
- }
+ bool isLeft = !(attachment < (n+1));
+ int i = (isLeft) ? (totalNumberAttachments - attachment - 1) : (attachment-1);
wxNode *node = GetRegions().Item(i);
if (node)
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
if (region->GetText())
{
- wxChar *s = copystring(region->GetText());
- dividedObject->FormatText(dc, s, i);
- delete[] s;
+ wxString s(region->GetText());
+ dividedObject->FormatText(dc, s.c_str(), i);
}
node = node->GetNext();
i++;