MantisBT - VTK
View Issue Details
0012531VTK(No Category)public2011-08-17 01:042016-05-13 17:04
edice 
Cory Quammen 
normalminorhave not tried
closedfixed 
 
7.1.0 
Kitware
incorrect functionality
0012531: vtkScalarBarRepresentation should only change orientation when moving, not resizing
When a user drags the edges of a vtkScalarBarWidget, and the mouse passes close to the edge of the view, often the bar will change orientation which can result in the bar jumping around the screen.

In this method:

void vtkScalarBarRepresentation::WidgetInteraction(double eventPos[2])
{
  // Let superclass move things around.
  this->Superclass::WidgetInteraction(eventPos);

  // Check to see if we need to change the orientation.
etc etc

at this point, the rest of the code should not be executed if the user is not moving with widget.

So, adding this test around the reorientation code improves the scalar bar behaviour a lot.

if (this->Moving)
{
  // Check to see if we need to change the orientation.
  etc etc code for reorientating bar
}

cheers
Paul
No tags attached.
Issue History
2011-08-17 01:04ediceNew Issue
2013-06-05 13:17Jean-Christophe Fillion-RobinNote Added: 0030895
2013-07-22 17:30Dave DeMarleNote Added: 0031187
2013-07-22 17:30Dave DeMarleStatusbacklog => expired
2013-07-22 17:30Dave DeMarleAssigned To => Dave DeMarle
2015-10-27 22:00Cory QuammenAssigned ToDave DeMarle => Cory Quammen
2015-10-27 22:00Cory QuammenStatusexpired => backlog
2015-10-27 22:00Cory QuammenNote Added: 0035397
2015-10-27 22:00Cory QuammenStatusbacklog => active development
2015-10-27 22:07Cory QuammenNote Added: 0035398
2016-05-13 17:04Cory QuammenNote Added: 0035953
2016-05-13 17:04Cory QuammenStatusactive development => closed
2016-05-13 17:04Cory QuammenResolutionopen => fixed
2016-05-13 17:04Cory QuammenFixed in Version => 7.1.0

Notes
(0030895)
Jean-Christophe Fillion-Robin   
2013-06-05 13:17   
Does the problem still occur with VTK 5.10 ? VTK 6 ?

Would be great if you could submit a patch using Gerrit. For more details see http://www.vtk.org/Wiki/VTK/Git/Develop [^]

Thanks
Jc
(0031187)
Dave DeMarle   
2013-07-22 17:30   
If this bug is still present in 6.0.0, please reopen this bug report.
(0035397)
Cory Quammen   
2015-10-27 22:00   
Bug still present.
(0035398)
Cory Quammen   
2015-10-27 22:07   
Potential fix posted at

https://gitlab.kitware.com/vtk/vtk/merge_requests/834 [^]
(0035953)
Cory Quammen   
2016-05-13 17:04   
Fixed in commit

commit 71db77dfcba2750a3a5d7be7f50038ad197ab935
Author: Cory Quammen <cory.quammen@kitware.com>
Date: Tue Oct 27 21:36:11 2015 -0400

    BUG 12531: Fixed problem with AutoOrient
    
    When resizing a vtkScalarBarWidget while AutoOrient is enabled, the
    scalar bar orientation may change while the dimension whose size is
    changing will not. This is odd behavior that can result in the scalar
    bar jumping around during resizing or the widget completely
    collapsing, making it impossible to interact with the widget.
    
    Fixed this by disallowing orientation swaps when the scalar bar
    representation is not moving.
    
    Modified TestScalarBarWidget.cxx to test this change.