Menu

#2986 If new views of a map are created their name in groovy is wrong

Next Release
fixed
nobody
None
normal
minor
HaveNotTried
none
Windows 10
1.9.x
2021-08-07
2021-07-26
Alexandre
No

If I create a new view of a map named mymap for example, using Menu > View > New map view, and then in groovy I type,

def s = []
c.getOpenMaps().each { map ->
s.add(map.name)
}
javax.swing.JOptionPane.showMessageDialog(null, s.join('\n'));

the list of maps that will be displayed with contain 2 times the same name for mymap,

mymap<2>
mymap<2>

but it should be

mymap
mymap<2>

because of that one my script fails to find a map because I created a new view of it.

Also if more than 2 views would be created, let's say 3 (I tested with 3) then the list of map names would be:

mymap<2>
mymap<2>
mymap<2>

which is really is wrong, it should be:

mymap
mymap<2>
mymap<3>

Discussion

  • Dimitry Polivaev

    • status: new --> fixed
     
  • Dimitry Polivaev

    preview 1.9.8_04
    Now only different maps are returned even if some maps have more than one view