From 82a6d57b3b7afe7a5f33d954664adc43758de014 Mon Sep 17 00:00:00 2001 From: William Joye Date: Sun, 4 Aug 2019 12:56:18 -0400 Subject: fix legend with fix margin error --- generic/tkbltGraphSup.C | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/generic/tkbltGraphSup.C b/generic/tkbltGraphSup.C index d5eb3d1..5071cac 100644 --- a/generic/tkbltGraphSup.C +++ b/generic/tkbltGraphSup.C @@ -211,16 +211,20 @@ void Graph::layoutGraph() if (!legend_->isHidden()) { switch (legend_->position()) { case Legend::RIGHT: - right += legend_->width_ + 2; + if (!ops->rightMargin.reqSize) + right += legend_->width_ + 2; break; case Legend::LEFT: - left += legend_->width_ + 2; + if (!ops->leftMargin.reqSize) + left += legend_->width_ + 2; break; case Legend::TOP: - top += legend_->height_ + 2; + if (!ops->topMargin.reqSize) + top += legend_->height_ + 2; break; case Legend::BOTTOM: - bottom += legend_->height_ + 2; + if (!ops->bottomMargin.reqSize) + bottom += legend_->height_ + 2; break; case Legend::XY: case Legend::PLOT: -- cgit v0.12