|
From: Liu Z. <ntu...@ya...> - 2001-12-12 06:31:00
|
Hihi,
I have some problem with removing an existing theme from the viewer.
When I called Viewer.remove(Theme), the shapes in the theme are still
visible, although I can not highlight or select them. and the corresponding
ThemePanel does not update, either.
I looked throught the source code of Viewer.java, and found that when a
theme is remove, it is not removed from themeStack. Since I am not very
familiar with the codes in Viewer.java, I am not sure whether this is a bug,
or there is some other tricks. However, after I made the following changes,
the removing of themes seems to be working.
here is the changes that I made in my local copy:
cvs -q diff Viewer.java (in directory
C:\Zehua\Work\src\geotools\src\uk\ac\leeds\ccg\geotools\)
Password: Index: Viewer.java
===================================================================
RCS file:
/cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/Viewer.java,v
retrieving revision 1.37
diff -c -r1.37 Viewer.java
*** Viewer.java 2001/11/23 18:51:46 1.37
--- Viewer.java 2001/12/12 06:21:10
***************
*** 325,330 ****
--- 325,334 ----
if(visibleThemes.contains(t)){visibleThemes.removeElement(t);}
if(staticThemes.contains(t)){
staticThemes.removeElement(t);
+ removeHighlightPositionChangedListener(t);
+ removeSelectionPositionChangedListener(t);
+ removeSelectionRegionChangedListener(t);
+ themeStack.removeTheme(t);
themeCount--;
updateStaticBuffer();
}
Regards,
Liu Zehua
Project Officer
Centre for Advanced Information Systems
Nanyang Technological University, Singapore
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|