https://issues.apache.org/ooo/show_bug.cgi?id=87182

--- Comment #14 from Armin Le Grand <[email protected]> ---
The order of initialization seems to be different from normal application
startup, the mpLayerTabBar member in GraphicViewShell is inited later as in
application startup. It gets filled with the current layer in
DrawViewShell::ChangeEditMode which has a switch bIsLayerModeActive that
changes the local mbIsLayerModeActive. This should in my opinion only be
switched to true (thats what happens and inits the LayerTabBar) when there is
already one. When forcing not do do that as long as there is no LayerTabBar,
the method DrawViewShell::ChangeEditMode gets called again (else not) with
bIsLayerModeActive == true and now initializes it as expected. After that all
works as in the Draw application.
Adding code to only switch mbIsLayerModeActive when there is a LayerTabBar
(already checked in pLayerBar).
This will solve this problem. The value for bIsLayerModeActive is set from
pView->IsLayerMode() in DrawViewShell::ReadFrameViewDatabut currently forced to
true in GraphicViewShell::ChangeEditMode. If in the future the setting of
pView->IsLayerMode() would be used again (what means Layers can be switched
off) then all places accessing DrawViewShell::GetLayerTabControl() would have
to be secured, too (29 places currently). Checking how hard that would be...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.

Reply via email to