SwNavigator: Improve detection of when the content tree needs refreshed
Makes the check that determines if the content tree needs refreshed be
done only when the content tree is visible AND (the document has been
modified since previous check OR an action has been made within the
content tree that requires the tree to be refreshed) AND there is no
writer shell action pending AND the content tree is not in a DnD.
Change-Id: Ie67472d44573df6afafb08b7b3229a4e07fc9db5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124036
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>