From 604d493cd60ae24c9f505518d8f8e37acdd2832c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 1 Nov 2013 16:00:20 +0000 Subject: [PATCH] Don't draw border if the width is zero. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index eee9efcf37..158e20273b 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -743,7 +743,7 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi wxTextAttrDimensionConverter converter(dc, buffer ? buffer->GetScale() : 1.0); // If we have a corner radius, assume all borders are the same, and draw a rounded outline. - if (attr.GetTextBoxAttr().HasCornerRadius() && borders.GetLeft().IsValid() && borders.GetLeft().GetStyle() != wxTEXT_BOX_ATTR_BORDER_NONE) + if (attr.GetTextBoxAttr().HasCornerRadius() && borders.GetLeft().IsValid() && (borders.GetLeft().GetWidth().GetValue() > 0) && borders.GetLeft().GetStyle() != wxTEXT_BOX_ATTR_BORDER_NONE) { int cornerRadius = converter.GetPixels(attr.GetTextBoxAttr().GetCornerRadius()); if (cornerRadius > 0) @@ -764,7 +764,7 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi } // Draw the border in one go if all the borders are the same - if (borders.GetLeft().IsValid() && borders.GetTop().IsValid() && borders.GetRight().IsValid() &&borders.GetBottom().IsValid() && + if (borders.GetLeft().IsValid() && (borders.GetLeft().GetWidth().GetValue() > 0) && borders.GetTop().IsValid() && borders.GetRight().IsValid() &&borders.GetBottom().IsValid() && (borders.GetLeft() == borders.GetTop()) && (borders.GetLeft() == borders.GetRight()) && (borders.GetLeft() == borders.GetBottom())) { borderLeft = converter.GetPixels(borders.GetLeft().GetWidth());