Commit 97351d92 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Still removing warnings for gcc7

parent e0c70a5c
......@@ -69,6 +69,7 @@ void ClickCollector::DoCollect(Int_t event, Int_t px, Int_t py, TObject */*obj*/
ClickCollector * ClickCollector::TheCollector()
{
if ( gfCollector == NULL ) new ClickCollector(); return gfCollector;
if ( gfCollector == NULL ) new ClickCollector();
return gfCollector;
}
......@@ -199,12 +199,10 @@ void CXCanvas::DrawEventStatus(Int_t event, Int_t px, Int_t py, TObject* selecte
// Report name and title of primitive below the cursor.
//
// This function is called when the option "Event Status"
// in the canvas menu "Options" is selected.
// in the canvas menu "Options" is selected.
char * atext = 0x0;
const Int_t kTMAX = 256;
const Int_t kTMAX=256;
static char atext[kTMAX];
if (!TestBit(kShowEventStatus) || !selected) return;
......@@ -214,14 +212,14 @@ void CXCanvas::DrawEventStatus(Int_t event, Int_t px, Int_t py, TObject* selecte
savepad = gPad;
gPad = GetSelectedPad();
fCanvasImp->SetStatusText(selected->GetTitle(), 0);
fCanvasImp->SetStatusText(selected->GetName(), 1);
fCanvasImp->SetStatusText(selected->GetTitle(),0);
fCanvasImp->SetStatusText(selected->GetName(),1);
if (event == kKeyPress)
snprintf(atext, kTMAX, "%c", (char) px);
snprintf(atext, kTMAX, "%c", (char) px);
else
snprintf(atext, kTMAX, "%d,%d", px, py);
fCanvasImp->SetStatusText(atext, 2);
fCanvasImp->SetStatusText(selected->GetObjectInfo(px, py), 3);
snprintf(atext, kTMAX, "%d,%d", px, py);
fCanvasImp->SetStatusText(atext,2);
fCanvasImp->SetStatusText(selected->GetObjectInfo(px,py),3);
gPad = savepad;
}
......@@ -353,13 +351,13 @@ void CXCanvas::HandleInput(EEventType event, Int_t px, Int_t py)
break;
case kButton1Double:
// triggered on the second button down within 350ms and within
// 3x3 pixels of the first button down, button up finishes action
case kButton1Shift:
if (FindHisto() && !FindHisto()->InheritsFrom("TH2"))
moved1D = true;
gVirtualX->SetLineWidth(1);
/* fall through */
case kButton1Down:
// find pad in which input occured
pad = Pick(px, py, prevSelObj);
......@@ -401,6 +399,9 @@ void CXCanvas::HandleInput(EEventType event, Int_t px, Int_t py)
moved2D = true;
}
}
/* fall through */
case kButton1ShiftMotion: //8 == kButton1Motion + shift modifier
if (fSelected && moved1D == false) {
......@@ -634,6 +635,7 @@ void CXCanvas::HandleInput(EEventType event, Int_t px, Int_t py)
}
}
/* fall through */
case kButton2Up:
if (fSelected) {
......@@ -647,8 +649,6 @@ void CXCanvas::HandleInput(EEventType event, Int_t px, Int_t py)
case kButton2Double:
break;
//*-*----------------------------------------------------------------------
case kButton3Down:
// popup context menu
pad = Pick(px, py, prevSelObj);
......@@ -692,6 +692,9 @@ void CXCanvas::HandleInput(EEventType event, Int_t px, Int_t py)
py = kKey_Up;
else if(py>fLastY)
py = kKey_Down;
/* fall through */
case kKeyPress:
if (!fSelectedPad || !fSelected) return;
gPad = fSelectedPad; // don't use cd() because we won't draw in pad
......
......@@ -192,7 +192,7 @@ void CXGateBox::ExecuteEvent(Int_t event, Int_t px, Int_t py)
gVirtualX->SetLineColor(1);
gVirtualX->SetLineWidth(2);
// No break !!!
/* fall through */
case kMouseMotion:
......
......@@ -119,10 +119,8 @@ const Char_t* AgataEventDisplay::fgDefaultPrismaConf = "solver.conf";
//__________________________________________________________
AgataEventDisplay* AgataEventDisplay::Instance()
{
if (fgInstance == 0x0)
fgInstance = new AgataEventDisplay();
return fgInstance;
if (fgInstance == 0x0) fgInstance = new AgataEventDisplay();
return fgInstance;
}
//__________________________________________________________
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment