MCPcopy Create free account
hub / github.com/MITK/MITK / Update

Method Update

Modules/Core/src/Controllers/mitkTimeNavigationController.cpp:51–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void mitk::TimeNavigationController::Update()
52{
53 if (m_BlockUpdate)
54 {
55 return;
56 }
57
58 if (m_InputWorldTimeGeometry.IsNull())
59 {
60 return;
61 }
62
63 if (0 == m_InputWorldTimeGeometry->CountTimeSteps())
64 {
65 return;
66 }
67
68 m_BlockUpdate = true;
69
70 if (m_LastUpdateTime < m_InputWorldTimeGeometry->GetMTime())
71 {
72 Modified();
73 }
74
75 if (m_LastUpdateTime < GetMTime())
76 {
77 m_LastUpdateTime = GetMTime();
78
79 TimeStepType inputTimeSteps = m_InputWorldTimeGeometry->CountTimeSteps();
80 const TimeBounds &timeBounds = m_InputWorldTimeGeometry->GetTimeBounds();
81 m_Stepper->SetSteps(inputTimeSteps);
82 m_Stepper->SetPos(0);
83 m_Stepper->SetRange(timeBounds[0], timeBounds[1]);
84 }
85
86 // unblock update; we may do this now, because if m_BlockUpdate was already
87 // true before this method was entered, then we will never come here.
88 m_BlockUpdate = false;
89
90 // Send the time. Do this even if nothing was changed, because maybe
91 // Update() was only called to re-send the old time data.
92 this->SendTime();
93}
94
95void mitk::TimeNavigationController::SendTime()
96{

Callers 3

InitializeViewsMethod · 0.45
InitializeViewMethod · 0.45

Calls 9

SendTimeMethod · 0.95
ModifiedFunction · 0.85
SetStepsMethod · 0.80
IsNullMethod · 0.45
CountTimeStepsMethod · 0.45
GetMTimeMethod · 0.45
GetTimeBoundsMethod · 0.45
SetPosMethod · 0.45
SetRangeMethod · 0.45

Tested by

no test coverage detected