Bug 166068 - ColorsAndFontsPropertySection is overwriting read only enablement on the refresh
Summary: ColorsAndFontsPropertySection is overwriting read only enablement on the refresh
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 1.0.3   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 157188 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-28 10:49 EST by Wayne CLA
Modified: 2007-04-04 12:51 EDT (History)
1 user (show)

See Also:


Attachments
Patch for ColorsAndFontsPropertySection (1.97 KB, patch)
2006-11-28 11:13 EST, Wayne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne CLA 2006-11-28 10:49:43 EST
In org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorsAndFontsPropertySection, the createFontsGroup() correctly determines whether it's in read only mode (using isReadOnly()) and correctly disables controls using setEnabled(false) when in read only mode.

However, the refresh() method completely ignores the previous enablement and redetermines enablement based on ep.getNotationView().getStyle(NotationPackage.eINSTANCE.getFontStyle()) != null.

Two issues.
1) No need to set enablement in createFontsGroup() if it will be immediately overwritten by settings in the refresh() method.
2) refresh() method needs to take isReadOnly() into account.

Please compare v1.7 and v1.8 of the file.
Comment 1 Wayne CLA 2006-11-28 11:13:10 EST
Created attachment 54642 [details]
Patch for ColorsAndFontsPropertySection

Addresses the read only issue.  Also enablement for fill button didn't seem to be set consistently & fixed that too.
Comment 2 Anthony Hunter CLA 2007-01-09 16:50:02 EST
committed patch to R1_0_maintenance and HEAD (updated copyright to 2007).
Comment 3 Alex Boyko CLA 2007-04-04 12:51:22 EDT
*** Bug 157188 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug