[vtkusers] bug in vtkLogoRepresentation

Paul Harris harris.pc at gmail.com
Sun Apr 18 19:08:16 EDT 2010


That didn't work, instead I moved the Selectable check further up, like so:

  // Set the cursor appropriately
-->  if ( self->Selectable && self->WidgetState == vtkBorderWidget::Start )
    {
    int stateBefore = self->WidgetRep->GetInteractionState();
    self->WidgetRep->ComputeInteractionState(X, Y);
    int stateAfter = self->WidgetRep->GetInteractionState();
    self->SetCursor(stateAfter);

--->    if ( stateAfter != vtkBorderRepresentation::Inside )

Now the mouse doesn't change cursor either, which is good.

I'm not sure if that is correct, theres this bit of code further down:

  if(!self->Resizable &&
    self->WidgetRep->GetInteractionState() !=
vtkBorderRepresentation::Inside)
    {
    return;
    }

I don't want it resizable either.  It doesn't appear to be...

cheers
Paul


On 19 April 2010 03:39, Bill Lorensen <bill.lorensen at gmail.com> wrote:

> Definitely a bug.
>
> In Widgets/vtkBorderWidget.cxx
> find the line
> if ( self->Selectable || stateAfter != vtkBorderRepresentation::Inside )
> and change it to
> if ( !self->Selectable || stateAfter != vtkBorderRepresentation::Inside )
>
> I think you will be the behaviour you expect. I'm not sure this is the
> proper fix. I would rather see a MovableOn/Off method.
>
> MovingOn/Off is used internally by the widget. I don't think the user
> should touch this.
>
> Bill
>
> On Fri, Apr 16, 2010 at 5:27 AM, Paul Harris <harris.pc at gmail.com> wrote:
> > Hi all,
> >
> > I'm trying to set up a Logo but I can't seem to turn off the interaction.
> >
> > bits of the code:
> >
> >  widget->SetInteractor(interactor);
> >  widget->SetRepresentation(rep);
> >  widget->SetSelectable(0);
> >  widget->SetResizable(0);
> >  widget->On();
> >
> > with this code, I can still drag the logo around with my mouse!
> >
> > Please help,
> > Paul
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100419/178aacc8/attachment.htm>


More information about the vtkusers mailing list