Skip to content

Commit

Permalink
fix bug in left click to relabel
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes committed Aug 19, 2020
1 parent e7b07eb commit 0c605ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solarannotator/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ def __init__(self, config):
self.axs[0].set_title("Preview")
self.axs[1].set_title("Thematic Map")

toolbar = NavigationToolbar(canvas, self)
layout.addWidget(toolbar)
self.toolbar = NavigationToolbar(canvas, self)
layout.addWidget(self.toolbar)
self.setLayout(layout)
import pdb; pdb.set_trace()

# add selection layer for lasso
self.shape = (1280, 1280) # TODO: replace with dynamic detection
Expand Down Expand Up @@ -192,9 +193,8 @@ def onclick(self, event):
if event.inaxes == self.axs[1]:
if event.button == 3: # right click feature
self.draw_event_region_boundary(event)
if event.button == 1:
pass
# self.rename_region(event)
if event.button == 1 and self.toolbar.mode == "":
self.rename_region(event)

def updateArray(self, array, indices, value):
"""
Expand Down

0 comments on commit 0c605ea

Please sign in to comment.