Changeset - b71a01086740
[Not reviewed]
default
0 1 0
Drew Perttula - 13 years ago 2012-06-14 06:26:13
drewp@bigasterisk.com
drop selection when a new curve is focused
Ignore-this: da79a73fd36ee70cea71ce76e574e46e
1 file changed with 14 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/curvecalc/curveview.py
Show inline comments
 
@@ -299,6 +299,7 @@ class Curveview(object):
 
        dispatcher.connect(self.update_curve, "mute changed", 
 
                           sender=self.curve)
 
        dispatcher.connect(self.select_between, "select between")
 
        dispatcher.connect(self.acls, "all curves lose selection")
 
        if self.knobEnabled:
 
            dispatcher.connect(self.knob_in, "knob in")
 
            dispatcher.connect(self.slider_in, "set key")
 
@@ -319,6 +320,11 @@ class Curveview(object):
 

	
 
        self.dragging_dots = False
 
        self.selecting = False
 

	
 
    def acls(self, butNot):
 
        if butNot is self:
 
            return
 
        self.unselect()
 
        
 
    def rebuild(self):
 
        """
 
@@ -371,11 +377,18 @@ class Curveview(object):
 
        print "   %s on %s" % (event, w)
 
        
 
    def onFocusIn(self, *args):
 
        dispatcher.send("all curves lose selection", butNot=self)
 

	
 
        self.widget.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red"))
 

	
 
    def onFocusOut(self, widget=None, event=None):
 
        self.widget.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("gray30"))
 

	
 
        # you'd think i'm unselecting when we lose focus, but we also
 
        # lose focus when the user moves off the toplevel window, and
 
        # that's not a time to forget the selection. See the 'all
 
        # curves lose selection' signal for the fix.
 

	
 
    def onKeyPress(self, widget, event):
 
        if event.string in list('12345'):
 
            x = int(event.string)
 
@@ -1052,6 +1065,7 @@ class Curvesetview(object):
 
    def takeFocus(self, *args):
 
        """the whole curveset's eventbox is what gets the focus, currently, so
 
        keys like 'c' can work in it"""
 
        dispatcher.send("all curves lose selection")
 
        self.curvesVBox.get_parent().grab_focus()
 

	
 
    def onKeyPress(self, widget, event):
0 comments (0 inline, 0 general)