[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for layers panel

From: Bernhard Herzog
Subject: Re: Patch for layers panel
Date: 14 Jan 2003 21:36:58 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

Ralf Engels <address@hidden> writes:

> Hi,
> Just submited the patch to savannah.


> Nr 938: New layer panel dialog
> Features:
> Shows all layers

In the reverse order, though. The top-most layer should be the top-most
one in the dialog as well.

> Allows to switch visibility, locked, printable, outline

This works.

> Allows to move layers, create new

This doesn't work for me. A click on the "New" button:

Traceback (most recent call last):
  File "/usr/local/lib/python2.1/site-packages/", line 125, in __call__
    ret = apply(self.func, a)
  File "Sketch/UI/", line 287, in NewLayer

There should be a () after the GetDocument.

How is moving layers supposed to work? Currently you can drag them
around but it doesn't affect the actual ordering. The up/down buttons
Traceback (most recent call last):
  File "/usr/local/lib/python2.1/site-packages/", line 125, in __call__
    ret = apply(self.func, a)
  File "Sketch/UI/", line 293, in DownLayer
    self.GetDocument().MoveLayerDown( self.GetSelectedLayer() )
  File "Sketch/UI/", line 265, in GetSelectedLayer
    return getSelectedLayers()[0]
NameError: global name 'getSelectedLayers' is not defined

Some general comments:

 - Some lines are indented with tabs. New code should be indented with
   spaces only.

 - Some of the methods in are preceeded by comments that
   describe what the methods do. These comments should be doc-strings.

 - Do we really need the PreviewColorFactory in its current form? ISTM a
   method of the LayerList that produces a pixmap with the right color
   is enough. That shouldn't take more than a few lines of code that
   only uses gdk.

   In the property panel the situation is different because it has to be
   able to draw any kind of fill pattern not just uniform colors.

And one more fundamental thing: The tree view was intended to be a
replacement for the layer dialog eventually. Implementing that would
probably be easier if we move to GTK 2 which has a model/view
architecture for trees.

So, I'm not sure we need a special layer dialog in 0.8. OTOH, the tree
view doesn't yet do what the layer dialog did so having a working layer
dialog would be better than having a non-working (as far as the layers
are concerned) tree dialog. So we might just as well add a layer dialog
for now. For that your dialog is alredy a good start.

> updating of the active layer not working

How are going to handle this? As you probably have seen the active layer
is still managed by the document object while it should really be
maintained by the editor.


Intevation GmbH                       

reply via email to

[Prev in Thread] Current Thread [Next in Thread]