That didn't work, instead I moved the Selectable check further up, like so:<br><br> // Set the cursor appropriately<br>--> if ( self->Selectable && self->WidgetState == vtkBorderWidget::Start ) <br> {<br>
int stateBefore = self->WidgetRep->GetInteractionState();<br> self->WidgetRep->ComputeInteractionState(X, Y);<br> int stateAfter = self->WidgetRep->GetInteractionState();<br> self->SetCursor(stateAfter);<br>
<br>---> if ( stateAfter != vtkBorderRepresentation::Inside )<br><br>Now the mouse doesn't change cursor either, which is good.<br><br>I'm not sure if that is correct, theres this bit of code further down:<br>
<br> if(!self->Resizable && <br> self->WidgetRep->GetInteractionState() != vtkBorderRepresentation::Inside)<br> {<br> return;<br> }<br><br>I don't want it resizable either. It doesn't appear to be...<br>
<br>cheers<br>Paul<br><br><br><div class="gmail_quote">On 19 April 2010 03:39, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Definitely a bug.<br>
<br>
In Widgets/vtkBorderWidget.cxx<br>
find the line<br>
if ( self->Selectable || stateAfter != vtkBorderRepresentation::Inside )<br>
and change it to<br>
if ( !self->Selectable || stateAfter != vtkBorderRepresentation::Inside )<br>
<br>
I think you will be the behaviour you expect. I'm not sure this is the<br>
proper fix. I would rather see a MovableOn/Off method.<br>
<br>
MovingOn/Off is used internally by the widget. I don't think the user<br>
should touch this.<br>
<br>
Bill<br>
<div><div></div><div class="h5"><br>
On Fri, Apr 16, 2010 at 5:27 AM, Paul Harris <<a href="mailto:harris.pc@gmail.com">harris.pc@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I'm trying to set up a Logo but I can't seem to turn off the interaction.<br>
><br>
> bits of the code:<br>
><br>
> widget->SetInteractor(interactor);<br>
> widget->SetRepresentation(rep);<br>
> widget->SetSelectable(0);<br>
> widget->SetResizable(0);<br>
> widget->On();<br>
><br>
> with this code, I can still drag the logo around with my mouse!<br>
><br>
> Please help,<br>
> Paul<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</blockquote></div><br>