wandererfan wrote: ↑
Wed Jan 08, 2020 4:05 pm
I know about the leader line issue. You have to click it in the tree, then it appears. I've looked for the bug a few times, but no success yet. Probably staring right at it without seeing it.
Don't know if this is of any help for you. When loading the project file then relevant function calls are:
Since the ViewProviderPage has no MDI view yet it returns null and its calling instances, too. That's why QGILeaderLine::draw then returns in the middle of the function, too.
If I disable this check (because it nowhere uses the "view" pointer) the leader line is at least shown in the MDI view, however at the wrong position. When selecting it then it jumps to the correct position.
The attachView function is called inside the constructor of MDIViewPage, i.e. before its assigned to the m_mdiView member of the ViewProviderPage. Maybe you should split the constructor into two parts:
leave the pure construction stuff in the constructor and move adding all items to a second function which you call from within ViewProviderPage::showMDIViewPage after the MDIViewPage is assigned to the m_mdiView.