From a95eb4cc3546727297515dc5bbb3a13b92d8fc6c Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 22 Apr 2015 17:41:57 -0500 Subject: [PATCH] fix algo to keep extra_text separate from other entries in multi-panel KLegend --- KCode/KLegend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KCode/KLegend.h b/KCode/KLegend.h index 153be908..5b139ec0 100644 --- a/KCode/KLegend.h +++ b/KCode/KLegend.h @@ -118,7 +118,7 @@ class KLegend{ //keep extra text and real legend entries separate //only when entries are being automatically split between panels if(!set_panels){ - for(unsigned t = 0; t < npanel - extra_text.size()%npanel; t++){ + for(unsigned t = 0; t < (npanel - extra_text.size()%npanel)%npanel; t++){ if(panel_ctr%npanel==0) panel_ctr = 0; AddEntry((TObject*)NULL,"","",panel_ctr); panel_ctr++;