[PythonCAD] Sample patch for selection highlighting

Stuart Brorson sdb at cloud9.net
Tue Nov 15 17:09:42 CET 2005


Hi Art --

I just grabbed the latest out of SVN (ver 2041).  I like the way it
works.  Very nice -- thank you! 

One minor buglet:  If I select an individual graphic element (e.g. a
segment), selecting works fine.  If I do a region select, I don't get
the "Click on the items you want to select" message after the region
select.   That is,  I click on the first
point in the region, then the prompt says "Click on another point to
select the region".   Then when I click on teh second point to close
the region select, the prompt still says "Click on another point to
select the region".  

I attach a very minor patch below to fix this problem.

One issue with this is that the different prompt messages get set all
over the place, which might lead to confusion.  However, it is part of
the way the program is architected, in that different callbacks are
invoked depending upon whether you've entered the first, second, or
whatever click.  Not a big enough issue ot be a showstopper, IMO.

Finally, I am still interesting in hearing your thoughts about the
layer window on the left.  In particular, how should it behave?  I
really want to fix this issue with entering corrdinates into the entry
box at the bottom of the top level window, and understanding how the
layer window is supposed to behave will help me figure out how to fix
it.

Stuart

Index: PythonCAD/Interface/Gtk/gtkedit.py
===================================================================
--- PythonCAD/Interface/Gtk/gtkedit.py  (revision 2041)
+++ PythonCAD/Interface/Gtk/gtkedit.py  (working copy)
@@ -58,6 +58,7 @@
     if len(_objs):
         for _obj in _objs:
             gtkimage.selectObject(_obj)
+    gtkimage.setPrompt("Click on the items you want to select.")
     select_mode_init(tool)
  
 def select_motion_notify(gtkimage, widget, event, tool):


More information about the PythonCAD mailing list