It's a race condition causing the problem.
The second GOSSIP_SHOW is called, and my routine is called.
The sequence is this:
I click on the NPC
GOSSIP_SHOW - fine, both quests are available, none active
I click on a quest
QUEST_DETAIL - fine shows me the detail of the clicked quest
I accept a quest, the window closes and immediately
GOSSIP_SHOW - my routine runs (correctly at that even)
QUEST_LOG_UPDATE - immediatly after my GOSSIP_SHOW ends
"The Screen Paints" - without the updates
I look and the updates to the quest title are gone
I then close & reopen the window and my routine again runs.
The problem is that something after GOSSIP_SHOW exits from me which overwrites the contents before I can see it. It's related to the accepting the quest and probably one of the following that occur after GOSSIP_SHOW:
UNIT_QUEST_LOG_CHANGED
QUEST_ACCEPTED
QUEST_LOG_UPDATE
I'm going to try hooking the GossipFrameUpdate() function and see where that gets me.
Any other ideas?
At worst I can put up an update timer for 1/2 second later or so and update the frame after making sure it's still open. Will that work or will I have to contrive to close/reopen the panel to get it to re-draw?