From 750a1d46ed714933904fa81ebc7e6dda985f101e Mon Sep 17 00:00:00 2001 From: Rene Brun <Rene.Brun@cern.ch> Date: Tue, 9 Aug 2005 16:50:41 +0000 Subject: [PATCH] From Ilka: SetBit(kcanDelete) is removed and the signal Closed() of the canvas is connected to the slot TurnOff of TTimer. These changes avoid the SegV when closing the canvas application and using .q command in root. git-svn-id: http://root.cern.ch/svn/root/trunk@12447 27541ba8-7e3a-0410-8455-c3a389f83636 --- test/Hello.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Hello.cxx b/test/Hello.cxx index 19fe59a99a9..5e72a6fe9cf 100644 --- a/test/Hello.cxx +++ b/test/Hello.cxx @@ -1,4 +1,4 @@ -// @(#)root/test:$Name: $:$Id: Hello.cxx,v 1.5 2003/01/31 15:42:19 brun Exp $ +// @(#)root/test:$Name: $:$Id: Hello.cxx,v 1.6 2004/08/04 04:34:08 brun Exp $ // Author: Valeriy Onuchin & Fons Rademakers 04/10/98 /////////////////////////////////////////////////////////////////// @@ -64,6 +64,8 @@ Hello::Hello(const char *text) : TTimer(40, kTRUE) else fPad = (TPad*)gPad; + Connect(fPad, "Closed()", "TTimer", this, "TurnOff()"); + while(text[fI]) { // create list of characters ch = new TChar(text[fI]); ch->SetTextFont(72); // times-bold-r-normal @@ -73,7 +75,6 @@ Hello::Hello(const char *text) : TTimer(40, kTRUE) fList->Add(ch); } - SetBit(kCanDelete); Draw(); // append this to current pad Paint(); // calculate new coordinates of chars and paint it gSystem->AddTimer(this); // start timer= start animation -- GitLab