Revision 24698
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/StyleSelector.java | ||
---|---|---|
221 | 221 |
|
222 | 222 |
@Override |
223 | 223 |
public Object getSelectedObject() { |
224 |
if (!accepted) return null; |
|
224 |
// if (!accepted) return null;
|
|
225 | 225 |
Object mySelectedElement = ((StylePreviewer) jPanelPreview).getStyle(); |
226 | 226 |
|
227 |
if(mySelectedElement == null) |
|
228 |
return null; |
|
229 |
|
|
227 | 230 |
if (mySelectedElement instanceof CartographicSupport) { |
228 | 231 |
CartographicSupport csSym = (CartographicSupport) mySelectedElement; |
229 | 232 |
csSym.setUnit(cmbUnits.getSelectedUnitIndex()); |
... | ... | |
358 | 361 |
} |
359 | 362 |
|
360 | 363 |
protected void propertiesPressed() { |
361 |
boolean state = accepted; |
|
362 |
accepted = true; |
|
364 |
// boolean state = accepted;
|
|
365 |
// accepted = true;
|
|
363 | 366 |
StyleEditor se = new StyleEditor((IStyle) getSelectedObject()); |
364 | 367 |
if(se != null){ |
365 | 368 |
PluginServices.getMDIManager().addWindow(se); |
366 | 369 |
setStyle(se.getStyle()); |
367 | 370 |
} |
368 |
accepted = state; |
|
371 |
// accepted = state;
|
|
369 | 372 |
} |
370 | 373 |
|
371 | 374 |
protected void savePressed() { |
372 |
if (getSelectedObject() ==null) |
|
375 |
if (getSelectedObject() == null)
|
|
373 | 376 |
return; |
374 | 377 |
|
375 | 378 |
JFileChooser jfc = new JFileChooser(rootDir); |
... | ... | |
470 | 473 |
cmbReferenceSystem.setSelectedIndex(referenceSystem); |
471 | 474 |
} |
472 | 475 |
|
476 |
public void windowClosed() { |
|
477 |
if (!accepted) { |
|
478 |
((StylePreviewer) jPanelPreview).setStyle(null); |
|
479 |
} |
|
480 |
} |
|
481 |
|
|
473 | 482 |
} |
Also available in: Unified diff