dc.SetTextForeground(cell.GetFgCol());
}
- // Draw Background
- dc.DrawRectangle(rect);
+ // Draw Background, but only if not rendering in control
+ // (as control already has rendered correct background).
+ if ( !(flags & (Control|ChoicePopup)) )
+ dc.DrawRectangle(rect);
const wxBitmap& bmp = cell.GetBitmap();
if ( bmp.Ok() &&
paintdata.m_drawnWidth = imageSize.x;
paintdata.m_drawnHeight = imageSize.y;
- if ( !isUnspecified )
- {
- property->OnCustomPaint( dc, imageRect, paintdata );
- }
- else
- {
- dc.SetBrush(*wxWHITE_BRUSH);
- dc.DrawRectangle(imageRect);
- }
+ property->OnCustomPaint( dc, imageRect, paintdata );
imageOffset = paintdata.m_drawnWidth;
}
// Has initial children
if ( GetChildCount() )
{
- FlagType parentalFlags = m_flags & wxPG_PROP_PARENTAL_FLAGS;
-
// Check parental flags
- wxASSERT_MSG( parentalFlags,
+ wxASSERT_MSG( (m_flags & wxPG_PROP_PARENTAL_FLAGS),
"Call SetFlag(wxPG_PROP_MISC_PARENT) or"
"SetFlag(wxPG_PROP_AGGREGATE) before calling"
"wxPGProperty::AddChild()." );
childValue = overrideValue;
else
childValue = curChild->GetValue();
- node++;
+ ++node;
if ( node != valueOverrides->end() )
overrideValue = *node;
else
}
}
- // Remove superfluous semicolon and space
- wxString rest;
- if ( text.EndsWith(wxS("; "), &rest) )
- text = rest;
-
if ( (unsigned int)i < m_children.size() )
- text += wxS("; ...");
+ {
+ if ( !text.EndsWith(wxS("; ")) )
+ text += wxS("; ...");
+ else
+ text += wxS("...");
+ }
}
wxString wxPGProperty::ValueToString( wxVariant& WXUNUSED(value),
{
if ( len > 0 )
{
- bool wasUnspecified = child->IsValueUnspecified();
-
if ( child->StringToValue(variant, token, propagatedFlags|wxPG_COMPOSITE_FRAGMENT) )
{
- // Clear unspecified flag only if OnSetValue() didn't
- // affect it.
- if ( child->IsValueUnspecified() &&
- (wasUnspecified || !UsesAutoUnspecified()) )
- {
- variant = child->GetDefaultValue();
- }
-
list.Append(variant);
changed = true;
{
int depth = 1;
- if ( it != text.end() ) it++;
+ if ( it != text.end() ) ++it;
pos++;
size_t startPos = pos;
while ( it != text.end() && depth > 0 )
{
a = *it;
- it++;
+ ++it;
pos++;
if ( a == wxS(']') )
if ( a == delimeter )
{
pos--;
- it--;
+ --it;
}
}
}
if ( a == 0 )
break;
- it++;
+ ++it;
if ( it != text.end() )
{
a = *it;
// Children in list can be in any order, but we will give hint to
// GetPropertyByNameWH(). This optimizes for full list parsing.
- for ( node = list.begin(); node != list.end(); node++ )
+ for ( node = list.begin(); node != list.end(); ++node )
{
wxVariant& childValue = *((wxVariant*)*node);
wxPGProperty* child = GetPropertyByNameWH(childValue.GetName(), i);
{
const wxString& childName = child->GetBaseName();
- for ( ; node != pList->end(); node++ )
+ for ( ; node != pList->end(); ++node )
{
const wxVariant& item = *((const wxVariant*)*node);
if ( item.GetName() == childName )
{
wxPGHashMapS2P::iterator it;
- for ( it = m_map.begin(); it != m_map.end(); it++ )
+ for ( it = m_map.begin(); it != m_map.end(); ++it )
{
wxVariantData* data = (wxVariantData*) it->second;
data->DecRef();