From ccda1ead6e80d3d39865fbfac4c8c430e6abaa0b Mon Sep 17 00:00:00 2001 From: Rene Brun <Rene.Brun@cern.ch> Date: Sun, 20 Apr 2003 21:26:45 +0000 Subject: [PATCH] In TTreePlayer::DrawSelect, do not draw the generated histogram if the number of selected rows is null and option "same" is not specified. Instead clear the current pad. git-svn-id: http://root.cern.ch/svn/root/trunk@6473 27541ba8-7e3a-0410-8455-c3a389f83636 --- treeplayer/src/TTreePlayer.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/treeplayer/src/TTreePlayer.cxx b/treeplayer/src/TTreePlayer.cxx index 5a78cae6d42..50346061c17 100644 --- a/treeplayer/src/TTreePlayer.cxx +++ b/treeplayer/src/TTreePlayer.cxx @@ -1,4 +1,4 @@ -// @(#)root/treeplayer:$Name: $:$Id: TTreePlayer.cxx,v 1.123 2003/04/09 08:48:09 brun Exp $ +// @(#)root/treeplayer:$Name: $:$Id: TTreePlayer.cxx,v 1.124 2003/04/09 16:30:19 brun Exp $ // Author: Rene Brun 12/01/96 /************************************************************************* @@ -717,7 +717,12 @@ Int_t TTreePlayer::DrawSelect(const char *varexp0, const char *selection, Option Bool_t draw = kFALSE; if (!drawflag && !opt.Contains("goff")) draw = kTRUE; fHistogram = (TH1*)fSelector->GetObject(); - + + if (!nrows && drawflag && !opt.Contains("same")) { + gPad->Clear(); + return 0; + } + //*-*- 1-D distribution if (fDimension == 1) { if (fSelector->GetVar1()->IsInteger()) fHistogram->LabelsDeflate("X"); -- GitLab