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
committed by Vadim Zeitlin
parent 6575ed47a1
commit a4f2f2ec6c

View File

@@ -1069,15 +1069,15 @@ void wxPropertyGrid::DoEndLabelEdit( bool commit, int selFlags )
{
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);
}