Fixed wxPropertyGrid::DoEndLabelEdit function

When label editing is finished then property label has to be always updated. If there is a text which is cached in the corresponding cell then it also needs to be updated.

See #16982.
This commit is contained in:
Artur Wieczorek
2015-05-10 18:32:00 +02:00
parent 91144a2247
commit d4440703b2

View File

@@ -1098,15 +1098,15 @@ void wxPropertyGrid::DoEndLabelEdit( bool commit, int selFlags )
{ {
cell = &prop->GetCell(labelColIdx); cell = &prop->GetCell(labelColIdx);
} }
else else if ( labelColIdx != 0 )
{ {
if ( labelColIdx == 0 )
prop->SetLabel(text);
else
cell = &prop->GetOrCreateCell(labelColIdx); cell = &prop->GetOrCreateCell(labelColIdx);
} }
if ( cell ) if ( labelColIdx == 0 )
prop->SetLabel(text);
if ( cell && cell->HasText() )
cell->SetText(text); cell->SetText(text);
} }