ncssar / caltopo_python

Python interface to unofficial CalTopo API
GNU General Public License v3.0
1 stars 1 forks source link

new features added directly into a folder aren't visible until after toggling folder visibility #5

Open caver456 opened 2 months ago

caver456 commented 2 months ago

After this code sequence:

fid=sts.addFolder('newFolder')
sts.addMarker(39,-120,'newMarker',description='desc',color='#00FF00',symbol='fire',size=4,folderId=fid)
sts.addLine([[-120,39],[-120.1,39.1],[-120,39.1]],title='newLine',description='desc',width=8,opacity=0.6,pattern='M12 -7M0 5M9 0A3 3 0 1 0 6 0 A3 3 0 0 0 9 0,2,20,T;M0 0L12 0,15,20',folderId=fid)

The objects in the folder aren't visible, and the left bar looks like this:

image

Burping the folder checkbox does make the new features visible (and populates their icon rows in the left bar).

caver456 commented 2 months ago

This is a real problem, but, it doesn't seem like there's a way to control it with API calls - would have to directly toggle the checkbox from code. Should check with Matt at some point. Probably the GUI doesn't have to deal with this. But - what about importing into a folder? Either way: removing from 2.0.0 checklist.

caver456 commented 2 months ago

does the folder have any properties that can be changed via API? Maybe that could toggle visibility of children? Or a property at folder-creation time that corresponds to the first checkbox when you create a folder in the GUI: image