Revision 22951 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/StyleEditor.java
StyleEditor.java | ||
---|---|---|
95 | 95 |
private Hashtable<AbstractButton, EditorTool> tools = new Hashtable<AbstractButton, EditorTool>(); |
96 | 96 |
private static ArrayList<Class> installedTools = new ArrayList<Class>(); |
97 | 97 |
private EditorTool prevTool; |
98 |
private IStyle oldStyle; |
|
98 | 99 |
|
99 | 100 |
private ActionListener okAction = new ActionListener() { |
100 | 101 |
public void actionPerformed(ActionEvent e) { |
... | ... | |
104 | 105 |
|
105 | 106 |
private ActionListener cancelAction = new ActionListener() { |
106 | 107 |
public void actionPerformed(ActionEvent e) { |
107 |
getStylePreviewer().setStyle(null);
|
|
108 |
getStylePreviewer().setStyle(oldStyle);
|
|
108 | 109 |
PluginServices.getMDIManager().closeWindow(StyleEditor.this); |
109 | 110 |
}; |
110 | 111 |
}; |
... | ... | |
118 | 119 |
*/ |
119 | 120 |
public StyleEditor(IStyle style) { |
120 | 121 |
if (style!=null) { |
122 |
oldStyle = style; |
|
121 | 123 |
IStyle sty = SymbologyFactory.createStyleFromXML(style.getXMLEntity(), style.getDescription()); |
122 | 124 |
getStylePreviewer().setStyle(sty); |
123 | 125 |
String desc = sty.getDescription(); |
Also available in: Unified diff