Commit fbd18135 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬 Committed by Kitware Robot
Browse files

Merge topic 'handle_widget_fixes'

517cc659

 Ensure widget state doesn't change when widget already enabled/disabled
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarDavid E. DeMarle <dave.demarle@kitware.com>
Merge-request: !4794
parents 527f4885 517cc659
......@@ -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