DoCaptureCenter option in TEve

Hi Matev,
In the EVE event display, picking up a rotation centre is very useful. However, in current version of TEve, the operation of pick up centre is a little bit complex, (need first to click file->edit object, then go to the main Eve page, enter Guide sub page, find pick center button…). Thus I want to make a direct pick center button in the options page. To do this, I use the DoCaptureCenter function defined in TGLViewerEditor class as following, but it doesn’t really work:

        TGLViewerEditor* K = 0;
        TGPictureButton* c = 0;
        c = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoHome.gif"));
        hf->AddFrame(c);
        c->Connect("Clicked()", "TGLViewerEditor", K, "DoCaptureCenter()");
   It compiles, but when I execute the display and click on the pick center button, it gives a segmentation fault. How to fix this problem?

root [0] 
 *** Break *** segmentation violation



===========================================================
There was a crash (#7 0x0082198d in SigHandler () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so).
This is the entire stack trace of all threads:
===========================================================
#0  0x00524416 in __kernel_vsyscall ()
#1  0x01e89f53 in __waitpid_nocancel () from /lib/libc.so.6
#2  0x01e2433b in do_system () from /lib/libc.so.6
#3  0x064ee59d in system () from /lib/libpthread.so.0
#4  0x0081b27d in TUnixSystem::Exec () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#5  0x00820cae in TUnixSystem::StackTrace () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#6  0x0082188d in TUnixSystem::DispatchSignals () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#7  0x0082198d in SigHandler () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#8  0x00817ec2 in sighandler () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#9  <signal handler called>
#10 0x07d0f73a in TGLViewerEditor::DoCaptureCenter ()
   from /home/manqi/Softwares/root/5.26.00/lib/libRGL.so
#11 0x07e06de7 in G__G__GL_481_0_21 () from /home/manqi/Softwares/root/5.26.00/lib/libRGL.so
#12 0x00def4d2 in Cint::G__CallFunc::Execute () from /home/manqi/Softwares/root/5.26.00/lib/libCint.so
#13 0x0080568b in TCint::CallFunc_Exec () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#14 0x00766e2d in TQConnection::ExecuteMethod () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#15 0x0076d89e in TQObject::Emit () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#16 0x053f65aa in TGButton::Clicked () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#17 0x053e77f4 in TGButton::EmitSignals () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#18 0x053e76d6 in TGButton::SetState () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#19 0x053e9cf3 in TGButton::HandleButton () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#20 0x054446a2 in TGFrame::HandleEvent () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#21 0x054062fd in TGClient::HandleEvent () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#22 0x05406d64 in TGClient::ProcessOneEvent () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#23 0x05406ddd in TGClient::HandleInput () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#24 0x05406e10 in TGInputHandler::Notify () from /home/manqi/Softwares/root/5.26.00/lib/libGui.so
#25 0x0081ef7f in TUnixSystem::DispatchOneEvent () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#26 0x0078e3a1 in TSystem::InnerLoop () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#27 0x0079126b in TSystem::Run () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#28 0x00725327 in TApplication::Run () from /home/manqi/Softwares/root/5.26.00/lib/libCore.so
#29 0x004cae44 in TRint::Run () from /home/manqi/Softwares/root/5.26.00/lib/libRint.so
#30 0x0806a40e in main (argc=2, argv=0xbfa8c344) at Druid.cc:269
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
[root.cern.ch/bugs](http://root.cern.ch/bugs). Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#10 0x07d0f73a in TGLViewerEditor::DoCaptureCenter ()
   from /home/manqi/Softwares/root/5.26.00/lib/libRGL.so
===========================================================


Root > 
root [0]