Reverting previous fix for floating object update in 3.0 branch pending further investigation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2014-06-08 13:55:54 +00:00
parent e2d5556984
commit 4e269b8628

View File

@@ -1692,14 +1692,15 @@ void wxRichTextCompositeObject::Invalidate(const wxRichTextRange& invalidRange)
} }
else if (child->IsTopLevel()) else if (child->IsTopLevel())
{ {
// Not sure why we did this, but it stops updated layout happening for floating objects. // JACS: Not sure why we did this, but it stops updated layout happening for floating objects.
#if 0 // DGHART: But we must do it for floating tables, otherwise the cell layout is lost.
if (wxRichTextBuffer::GetFloatingLayoutMode() && child->IsFloating() && GetBuffer()->GetFloatCollector() && GetBuffer()->GetFloatCollector()->HasFloat(child)) // JACS: this is probably still wrong. Needs further investigation.
if (wxRichTextBuffer::GetFloatingLayoutMode() && child->IsFloating() && wxDynamicCast(child, wxRichTextTable)
&& GetBuffer()->GetFloatCollector() && GetBuffer()->GetFloatCollector()->HasFloat(child))
{ {
// Don't invalidate subhierarchy if we've already been laid out // Don't invalidate subhierarchy if we've already been laid out
} }
else else
#endif
{ {
if (invalidRange == wxRICHTEXT_NONE) if (invalidRange == wxRICHTEXT_NONE)
child->Invalidate(wxRICHTEXT_NONE); child->Invalidate(wxRICHTEXT_NONE);