From 4e269b86285131712e93203e26bd12fb9b6daa01 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 8 Jun 2014 13:55:54 +0000 Subject: [PATCH] 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 --- src/richtext/richtextbuffer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 3aa705d9df..3156a9433b 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -1692,14 +1692,15 @@ void wxRichTextCompositeObject::Invalidate(const wxRichTextRange& invalidRange) } else if (child->IsTopLevel()) { - // Not sure why we did this, but it stops updated layout happening for floating objects. -#if 0 - if (wxRichTextBuffer::GetFloatingLayoutMode() && child->IsFloating() && GetBuffer()->GetFloatCollector() && GetBuffer()->GetFloatCollector()->HasFloat(child)) + // JACS: Not sure why we did this, but it stops updated layout happening for floating objects. + // DGHART: But we must do it for floating tables, otherwise the cell layout is lost. + // 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 } else -#endif { if (invalidRange == wxRICHTEXT_NONE) child->Invalidate(wxRICHTEXT_NONE);