Skip to content

Commit

Permalink
mavpicviewer: flake cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Sep 22, 2024
1 parent 186eb32 commit 34b7150
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions MAVProxy/tools/mavpicviewer/mosaic_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, filelist, image_select_cb):
img_path = self.filelist[i]
wx_image = wx.Image(img_path, wx.BITMAP_TYPE_ANY).Scale(100, 100)
image = wx.StaticBitmap(panel, i, wx.Bitmap(wx_image))

# bind event for left mouse button click
image.Bind(wx.EVT_LEFT_DOWN, self.on_image_click)

Expand All @@ -109,7 +109,6 @@ def __init__(self, filelist, image_select_cb):
self.vert_sizer.Add(self.text_status, proportion=0, flag=wx.EXPAND, border=5)
self.vert_sizer.Add(self.scrolled_panel, proportion=0, flag=wx.EXPAND | wx.ALL, border=5)
self.vert_sizer.Add(self.horiz_sizer, proportion=0, flag=wx.EXPAND)
#self.frame.Bind(wx.EVT_SIZE, self.on_resize)
self.frame.SetSizer(self.vert_sizer)

# display all images and update layou
Expand Down Expand Up @@ -191,7 +190,7 @@ def set_filenunmber(self, filenumber):
print("picviewer: ignoring invalid filenumber %d (>%d)" % (filenumber, num_files-1))
return

# record previous filenumber
# record previous filenumber
prev_filenumber = self.filenumber

# set current filenumber
Expand Down Expand Up @@ -279,7 +278,7 @@ def display_all_images(self, poi_only=False):
# add panels to scrolled panel sizer
for i in range(len(self.filelist)):
# check if we should only display POI images
if poi_only == True and self.poi_dict[i] == False:
if poi_only is True and self.poi_dict[i] is False:
continue
panel = self.panel_dict[i]
if panel is not None:
Expand All @@ -306,4 +305,3 @@ def hide_image(self, filenumber):
panel = self.scrolled_panel_sizer.GetItem(self.filenumber).GetWindow()
self.scrolled_panel_sizer.Detach(panel)
self.scrolled_panel_sizer.Layout()

0 comments on commit 34b7150

Please sign in to comment.