Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/xdot/xdot_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def copy(self):
def highlighted(self):
pen = self.copy()
pen.color = (1, 0, 0, 1)
# pen.color = (246/255.0, 36/255.0, 89/255.0, 1)
pen.fillcolor = (1, .8, .8, 1)
# pen.fillcolor = (.2, .2, .2, 1)
return pen

class Shape:
Expand Down Expand Up @@ -505,10 +507,11 @@ def read_code(self):
self.pos = pos + 1
while self.pos < len(self.buf) and self.buf[self.pos].isspace():
self.pos += 1
#print self.buf[:pos]
return res

def read_number(self):
return int(self.read_code())
return int(float(self.read_code()))

def read_float(self):
return float(self.read_code())
Expand Down Expand Up @@ -591,7 +594,6 @@ def lookup_color(self, c):

def parse(self):
s = self

while s:
op = s.read_code()
if op == "c":
Expand Down Expand Up @@ -1464,7 +1466,7 @@ def __init__(self, parent=None):
def set_filter(self, filter):
self.filter = filter

def set_dotcode(self, dotcode, filename='<stdin>',center=True):
def set_dotcode(self, dotcode, filename='<stdin>',center=False):
if isinstance(dotcode, unicode):
dotcode = dotcode.encode('utf8')
p = subprocess.Popen(
Expand Down Expand Up @@ -1700,8 +1702,10 @@ def mouseReleaseEvent(self, event):
url = self.get_url(x, y)
if url is not None:
self.emit(SIGNAL("clicked"), unicode(url.url), event)
self.emit(SIGNAL("clicked_location"), [x,y], event)
else:
self.emit(SIGNAL("clicked"), 'none', event)
self.emit(SIGNAL("clicked_location"), [x,y], event)
jump = self.get_jump(x, y)
if jump is not None:
self.animate_to(jump.x, jump.y)
Expand Down