I was advised by Jean-Pierre Charras to bring this discussion to the developers 
mailing list. Can anyone assist?
In the nightly, when adding DRAWSEGMENTS to the board's Drawings list, 
thedisplay does not refresh, and a similar problem when setting an object 
toselected. When switching views from OpenGL to default, and back to OpenGL, 
thenewly drawn and newly selected objects appear in the OpenGL canvas.
This happens from a python script. For example, execute the following inthe 
Scripting Console:
import pcbnewfor d in pcbnew.GetBoard().GetDrawings(): d.SetSelected()    def 
draw_segment(self,x1,y1,x2,y2,layer=pcbnew.Dwgs_User,thickness=0.15*pcbnew.IU_PER_MM):
    """Draws the line segment indicated by the x,y values    on the given layer 
and with the given thickness."""    board = pcbnew.GetBoard()    
ds=pcbnew.DRAWSEGMENT(board)    board.Add(ds)    
ds.SetStart(pcbnew.wxPoint(x1,y1))    ds.SetEnd(pcbnew.wxPoint(x2,y2))    
ds.SetLayer(layer)    ds.SetWidth(max(1,int(thickness)))
drawsegment(0,0,100000000,100000000,layer=pcbnew.Eco2.User)
The canvas requires switch views and back to OpenGL to see thenew line and the 
newly selected objects.
When refreshing the display from the menu item or with F3, none of the changed 
items are displayed. Is there a recommended "refresh" function call? .Refresh() 
on the board and on the pcbnew wx frame. does not work either. In 406 stable, 
the newly selected items (via .SetSelected() on the object) are updated on the 
OpenGL view when the mouse enters the frame, but this stopped working in the 
nightly.
I've traced some of the C code and will continue to trace. I got as far as 
seeing calls to item.Update() and some references to the invalidate list.


# You can also use this loop to reset the objects selected:for d in 
pcbnew.GetBoard().GetDrawings(): d.ClearSelected() 
Application: kicadVersion: (2017-07-31 revision 67ae5935d)-makepkg, release 
buildLibraries: wxWidgets 3.0.2           libcurl/7.54.0 OpenSSL/1.0.2k 
zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3Platform: Windows 7 (build 
7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW- Build Info 
-wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)Boost: 1.63.0Curl: 
7.54.0KiCad - Compiler: GCC 6.3.0 with C++ ABI 1010        Settings: 
USE_WX_GRAPHICS_CONTEXT=OFF                  USE_WX_OVERLAY=OFF                 
 KICAD_SCRIPTING=ON                  KICAD_SCRIPTING_MODULES=ON                 
 KICAD_SCRIPTING_WXPYTHON=ON                  KICAD_SCRIPTING_ACTION_MENU=ON    
              BUILD_GITHUB_PLUGIN=ON                  KICAD_USE_OCE=ON
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to