only handle context menu event if showing tree widget