Problem 1998

Summary: external app and QtViewer
Product: Geant4 Reporter: ungaro
Component: visualization/OpenGLAssignee: Laurent Garnier <laurent.garnier>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P4    
Version: 10.3   
Hardware: All   
OS: All   

Description ungaro 2017-08-25 21:07:50 CEST
Both p01 and p02 of 10.3 do not work properly if launched from a qtapplication. 

A fix by Laurent exists but it is not applied to these patches: 

The function 

G4OpenGLQtViewer::isCurrentWidget() in G4OpenGLQtViewer.cc needs to account for external app:

bool G4OpenGLQtViewer::isCurrentWidget(){
	G4Qt* interactorManager = G4Qt::getInstance ();
	if (!interactorManager->IsExternalApp()) {
		// Prevent from repainting a hidden tab (the current tab name has to be the one of th GL viewer)
  		if ( GetName() != fUiQt->GetViewerTabWidget()->tabText(fUiQt->GetViewerTabWidget()->currentIndex()).toStdString().c_str()) {
	  		return false;
  		}
	}
	return true;
}
Comment 1 Laurent Garnier 2017-09-01 17:44:52 CEST
Hi Ungaro, 

That was my fault, it should be fix in the next patch/relesae.
Thanks for the reminder !

Cheers, 
Laurent