I just posted this as Feature Request #4702 as it's not really a bug, but it is an "unexpected behavior" which should be fixed for the to-do panel.
Not sure what the best solution is, but if anyone has a good idea, I can post it in as part of the comments. Thx.
-------------------------------------------------------------------------------------------
My Workspace consists of a library project and an
unittest project.
My To-do list is usually set to Scope: "All project files"
and I am selected on the unittest project, so the To-
Do list will only display items from the unittest.
> Unexpected Behavior <-----------------
I usually have files open from both projects. If I
happen to click on a LIBRARY file with a to-do inside,
the panel will add this to-do to the panel, but if I click the
Refresh button, it will disappear!!!
Technically, this is not incorrect, but it is rather
confusing. The system is in a weird state-based funk.
My suggestion is to Add "All Workspace Files" as an
option. I would usually have this option selected, so
the view is consistent. This doesn't really solve the
problem for the other options, where there is a conflict
between the setting and the "want to see all TODO's in
the file I'm editing" - maybe a checkbox in the panel?
But that would clutter things up - not sure what is
best...