Commit 517cc659 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬
Browse files

Ensure widget state doesn't change when widget already enabled/disabled

This change fixes Slicer issue:
https://issues.slicer.org/view.php?id=4628
parent 4b35a245
......@@ -374,6 +374,10 @@ void vtkHandleWidget::PrintSelf(ostream& os, vtkIndent indent)
//-------------------------------------------------------------------------
void vtkHandleWidget::SetEnabled(int enabling)
{
if (this->Enabled == enabling)
{
return;
}
if ( !this->ShowInactive )
{
// Forward to superclass
......@@ -399,11 +403,6 @@ void vtkHandleWidget::SetEnabled(int enabling)
{
vtkDebugMacro(<< "Disabling widget");
if (!this->Enabled) // already disabled, just return
{
return;
}
this->Enabled = 0;
// don't listen for events any more
......
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