Commit 16e1464b authored by Guillaume Seguin's avatar Guillaume Seguin

Run clickcb in stlview on double click

parent 362207d6
...@@ -143,13 +143,8 @@ class StlViewPanel(wxGLPanel): ...@@ -143,13 +143,8 @@ class StlViewPanel(wxGLPanel):
self.parent.filenames = None self.parent.filenames = None
def double(self, event): def double(self, event):
p = event.GetPositionTuple() if hasattr(self.parent, "clickcb") and self.parent.clickcb:
sz = self.GetClientSize() self.parent.clickcb(event)
v = map(lambda m, w, b: b * m / w, p, sz, self.build_dimensions[0:2])
v[1] = self.build_dimensions[1] - v[1]
v += [300]
print "Double-click at " + str(v) + " in "
print self
def forceresize(self): def forceresize(self):
self.SetClientSize((self.GetClientSize()[0], self.GetClientSize()[1] + 1)) self.SetClientSize((self.GetClientSize()[0], self.GetClientSize()[1] + 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment