Commit 96fc27a6 authored by finetjul's avatar finetjul
Browse files

ENH: Add vtkMRMLAnnotationClickCounter::Click

HasEnoughClicks doesn't provide enough flexibility when dealing with

git-svn-id: 3bd1e089-480b-0410-8dfb-8563597acbee
parent 5cdc6298
......@@ -33,15 +33,21 @@ void vtkMRMLAnnotationClickCounter::Reset()
this->m_Clicks = 0;
int vtkMRMLAnnotationClickCounter::Click()
return ++this->m_Clicks;
bool vtkMRMLAnnotationClickCounter::HasEnoughClicks(int clicks)
if (this->m_Clicks==clicks)
return true;
return true;
return false;
......@@ -32,7 +32,13 @@ public:
vtkTypeRevisionMacro(vtkMRMLAnnotationClickCounter, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
/// Check if enough clicks are counted
/// Increase the click counter and return the number of clicks.
/// \sa HasEnoughClicks()
int Click();
/// Check if enough clicks are counted and reset the click number if it
/// is equal to \a clicks
/// \sa Click(), Reset()
bool HasEnoughClicks(int clicks);
/// Reset the click counter
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