Hi Christian, yes, either of those ways would solve my problem.
Thanks, Miklos On 14 August 2014 10:22, Weber, Christian(1) <[email protected]> wrote: > Hi Miklos, > > > > thats a tricky one. Generally Observers should not be able to modify the > IsHandled flag, as they should be all equal in what events they receive. > > On the other hand an action has already been triggered so passing the > event to VTK is not a good solution eighter. > > > > It’s a design problem we created because DisplayInteractor is a hybrid of > DataInteractor (for which your desired behavior is implemented) and Observer > > (for which this behavior is disabled) . > > > > I think two solutions are possible > > · Allowing Observers to modify the isHandled Flag (by passing is > as pointer) > > · Adding an optional return value to Notify that allows to signal > that an action has been taken and the final return value in ProcessEvent > > Is set as (isHandled || this return value ) > > > > Would this solve the problem ? > > > > Best > > Christian > > > > *From:* Miklos Espak [mailto:[email protected]] > *Sent:* Mittwoch, 13. August 2014 21:38 > *To:* mitk-users > *Subject:* [mitk-users] DataInteractors cannot override VTK interactions? > > > > Hi, > > we have custom display interactor for our viewer, derived from > mitk::DisplayInteractor. I'd like to disable the zooming by mouse wheel in > the 3D render window, as we use the right mouse button for zooming. > > The display interactor gets the scroll event, and in case it's from the 3D > window, the action function returns 'true' without doing anything. > > However, the wheel event is still passed down to the VTK layer which > processes it. It happens here: > > > http://mitk.org/git/?p=MITK.git;a=blob;f=Modules/QtWidgets/QmitkRenderWindow.cpp;h=710b1a176c8b7947a3553338b50082fc17342492;hb=HEAD#l181 > > Is there a way to disable this? > > The idea is that if an MITK interactor has processed the event, it should > not be delegated to VTK. > > The problem seems to be mitk::Dispatcher: > > > http://mitk.org/git/?p=MITK.git;a=blob;f=Core/Code/Interactions/mitkDispatcher.cpp;h=c0d77b3d6f39bbbdc65bb303d5433fb9967a8f97;hb=HEAD#l182 > > where the 'eventIsHandled' flag is not set to 'true'. Maybe the Notify() > functions should take the 'isHandled' argument as reference and set it when > they handled the event? > > Shall I open a ticket? Any idea for a workaround? > > Cheers, > Miklos > > > ------------------------------------------------------------------------------ > > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > >
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
