comparison pyink/MBScene.py @ 1216:61f1b3d424cf

Change order of framelines. - In reversed order. - Later ones always at top of earier ones.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 05 Jan 2011 19:27:05 +0800
parents e55499f7505a
children 93acb8568ad3
comparison
equal deleted inserted replaced
1215:8e372ae69010 1216:61f1b3d424cf
581 label = gtk.Label('') 581 label = gtk.Label('')
582 label.set_size_request(100,0) 582 label.set_size_request(100,0)
583 hbox.pack_start(label,expand=False, fill=True) 583 hbox.pack_start(label,expand=False, fill=True)
584 hbox.pack_start(line) 584 hbox.pack_start(line)
585 vbox.pack_start(hbox, False) 585 vbox.pack_start(hbox, False)
586 586
587 if layer_idx != len(self._framelines): 587 # Put later one on the top of earier one, but after the ruler.
588 vbox.reorder_child(hbox, layer_idx + 1) # there is ruler at pos 0 588 position = len(self._framelines) - layer_idx + 1
589 pass 589 vbox.reorder_child(hbox, position)
590 590
591 self._framelines[layer_idx: layer_idx] = [line] 591 self._framelines[layer_idx: layer_idx] = [line]
592 592
593 line.label = label 593 line.label = label
594 line.layer_idx = layer_idx 594 line.layer_idx = layer_idx