|
List Info
Thread: Adding layers
|
|
| Adding layers |

|
2006-10-06 15:10:13 |
Hi,
I just downloaded and installed PythonCAD-DS1-R34 from the
PythonCAD website.
First of all: thanks for this great program!
I have however one question, regarding layers. PythonCAD
seems to support
multiple layers, but I don't find how to add layers.
Right clicking in the layers field on the left of the
screen, gives me the
following errors in the console:
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
line 104, in __treeViewButtonPress
_menu = self.__makePopupMenu(widget, _x, _y)
File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
line 111, in __makePopupMenu
_path, _col, _cx, _cy = widget.get_path_at_pos(x, y)
TypeError: unpack non-sequence
So I have a feeling that something goes wrong in creating
the PopupMenu.
Is this a known bug?
Or is it a problem with my installation?
I am on Debian unstable, and have Python 2.4 as default, and
PyGTK2 package
from the Debian repository installed.
Thanks for any help,
sincerely,
Marije
_______________________________________________
PythonCAD mailing list
PythonCAD python.org
htt
p://mail.python.org/mailman/listinfo/pythoncad
|
|
| Adding layers |

|
2006-10-08 01:05:08 |
On Fri, Oct 06, 2006 at 05:10:13PM +0200, nescivi wrote:
> Hi,
>
> I just downloaded and installed PythonCAD-DS1-R34 from
the PythonCAD website.
>
> First of all: thanks for this great program!
Thanks.
> I have however one question, regarding layers.
PythonCAD seems to support
> multiple layers, but I don't find how to add layers.
>
> Right clicking in the layers field on the left of the
screen, gives me the
> following errors in the console:
>
> Traceback (most recent call last):
> File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
> line 104, in __treeViewButtonPress
> _menu = self.__makePopupMenu(widget, _x, _y)
> File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
> line 111, in __makePopupMenu
> _path, _col, _cx, _cy = widget.get_path_at_pos(x,
y)
> TypeError: unpack non-sequence
>
> So I have a feeling that something goes wrong in
creating the PopupMenu.
>
> Is this a known bug?
> Or is it a problem with my installation?
It's probably a bug, and I'll take a shot at fixing it this
weekend.
> I am on Debian unstable, and have Python 2.4 as
default, and PyGTK2 package
> from the Debian repository installed.
I'm also running Debian unstable on my main computer, so I
should be
able to fix things.
> Thanks for any help,
Art Haas
--
Man once surrendering his reason, has no remaining guard
against absurdities
the most monstrous, and like a ship without rudder, is the
sport of every wind.
-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
PythonCAD python.org
htt
p://mail.python.org/mailman/listinfo/pythoncad
|
|
| Adding layers |

|
2006-10-10 20:27:58 |
On Fri, Oct 06, 2006 at 05:10:13PM +0200, nescivi wrote:
> Hi,
> I have however one question, regarding layers.
PythonCAD seems to support
> multiple layers, but I don't find how to add layers.
>
> Right clicking in the layers field on the left of the
screen, gives me the
> following errors in the console:
>
> Traceback (most recent call last):
> File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
> line 104, in __treeViewButtonPress
> _menu = self.__makePopupMenu(widget, _x, _y)
> File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/G
tk/gtkshell.py",
> line 111, in __makePopupMenu
> _path, _col, _cx, _cy = widget.get_path_at_pos(x,
y)
> TypeError: unpack non-sequence
>
> So I have a feeling that something goes wrong in
creating the PopupMenu.
Hi.
The patch below should fix things. I've always clicked on
the names in
the list and not the blank area below the final name, so I'd
not seen
this before. After the patch is applied, I can click in the
blank area
and not get the backtrace.
Thanks for the info, and please let me know if the patch
below fixes
things for you.
Art Haas
Index: PythonCAD/Interface/Gtk/gtkshell.py
============================================================
=======
--- PythonCAD/Interface/Gtk/gtkshell.py (revision 2616)
+++ PythonCAD/Interface/Gtk/gtkshell.py (working copy)
 -102,13
+102,17 
_rv = event.window is widget.get_bin_window() and
_button == 3
if _rv:
_menu = self.__makePopupMenu(widget, _x, _y)
- _menu.popup(None, None, None, _button,
event.time)
+ if _menu is not None:
+ _menu.popup(None, None, None, _button,
event.time)
return _rv
def __makePopupMenu(self, widget, x, y):
# print "Entered
LayerDisplay._makePopupMenu"
+ _data = widget.get_path_at_pos(x, y)
+ if _data is None:
+ return None
+ _path, _col, _cx, _cy = _data
_model = widget.get_model()
- _path, _col, _cx, _cy = widget.get_path_at_pos(x,
y)
_iter = _model.get_iter(_path)
_layer = _model.get_value(_iter, 1)
#
--
Man once surrendering his reason, has no remaining guard
against absurdities
the most monstrous, and like a ship without rudder, is the
sport of every wind.
-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
PythonCAD python.org
htt
p://mail.python.org/mailman/listinfo/pythoncad
|
|
[1-3]
|
|