Hi Weike, Liang Weike wrote: > Hi Andre, > > I made an investigation of issue 73871 and tracked it. > > While the rectangle is converted into bitmap the program should add > "graphicobjectbar" to the tool bar. During the procedure the > toolbarmanager in sd module will add it and then post the update. And > within the method "void ToolBarManager::Implementation::PostUpdate > (void)" there is the line "mxLayouter->requestElement(sFullName);" which > passes to the layoutmanager involved in framework module to handle the > element of toolbar. But the method requestElement doesn't work well: the > layoutmanager does not request it successfully. So should the method > requestElement be modified to make the return value true?
No. I just stepped through this code and found that after the conversion from rectangle to bitmap PostUpdate() is called with an empty set of tool bars that is to be activated. So the problem occurs earlyier. When the bitmap has been created the old shape is replaced with the new bitmap shape. This leads to a change of the selection, which in turn triggers eventually the ToolBarRules::SelectionHasChanged() method. Here a context is retrieved from the view and the set of active tool bars is adapted accordingly. The context after the conversion should be SDRCONTEXT_GRAPHIC but for some reason it is SDRCONTEXT_STANDARD. Probably the context has not yet been updated. When the user deselects the new shape and then selects it again the same SelectionHasChanged() method is called but this time the context is correct. So, find out why the context is not updated when SelectionHasChanged() is called and the fix of this issue will probably present itself. > > Best regards, > Weike > Best regards, Andre > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
