| Summary: | TextFlow doesn't paint a border properly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Pratik Shah <ppshah> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | Pratik Shah <ppshah> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | hudsonr | ||||
| Version: | 3.4 | ||||||
| Target Milestone: | 3.4.0 (Ganymede) M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Pratik Shah
Created attachment 86492 [details]
Patch for the project
Patch for the fix in InlineFlow
In the patch above, I've removed the lines that were preventing the TextFlow's border from being displayed properly. I'm not sure what the purpose of those lines of code was. But since FlowBorders don't work for InlineFlows anyway (see bug 215266), it shouldn't matter. The patch has been committed to head. Marking as fixed. Pratik, the call to restoreState() seems superfluous. paintSelection() does this already if called. and Figure.paint() already calls pop() right after paintBorder(). TextFlow overrides paintSelection() and doesnt call restoreState(). So, I thought it would be better placed in paintBorder() before it calls paintSelection(). Maybe we could add it to TextFlow#paintSelection too then. It's just a bunch of fields getting assigned, but it doesn't hurt to avoid doing it twice :-P. Well, then maybe we should avoid doing it even once when we can. When there's no border, there's no need to restoreState() at all. I can remove restoreState() from InlineFlow#paintSelection() :-P |