Hi again,
SetFocus is, as far as I know, just meant to set the default widget inside your
view. You could try to also derive your view from ILifecycleAwarePart. Then you
can override the methods Activated() and Deactivated().Visible(), and Hidden().
Best,
Stefan
From: Bertram Sabrowsky-Hirsch
[mailto:bertram.sabrowsky-hir...@risc-software.at]
Sent: Dienstag, 19. Juni 2018 10:12
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] QmitkAbstractView::SetFocus
Hi everyone,
I am trying to detect whether my plugin is activated/focused or not by
overriding the QmitkAbstractView::SetFocus method.
As one might think, the method is called whenever the focus of the plugin
changes (for some reason twice when it is refocused), however I can't find a
way to tell whether it is focused or not since the method does not have a
parameter that would state that. I also checked QmitkAbstractView and
associated classes (IWorkbenchPart, IWorkbenchPage, ...) for Get... methods but
all I found was a GetActivePart method that does not seem to work as expected
within the SetFocus method.
Is there a way to check whether the plugin is focused from a QmitkAbstractView
derived class?
Kind regards,
Bertram
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users