diff --git a/.gitignore b/.gitignore index 9b41e9d..72b5e14 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ chapter22_type_hints/.mypy_cache/ *.pyc *.zip *.db -*.pdf \ No newline at end of file +*.pdf +*.mypy_cache \ No newline at end of file diff --git a/chapter42_gui/image_viewer_working.py b/chapter42_gui/image_viewer_working.py index 8e4dec4..3abd01f 100644 --- a/chapter42_gui/image_viewer_working.py +++ b/chapter42_gui/image_viewer_working.py @@ -9,7 +9,7 @@ def __init__(self, parent, image_size): self.max_size = 240 img = wx.Image(*image_size) - self.image_ctrl = wx.StaticBitmap(self, + self.image_ctrl = wx.StaticBitmap(self, bitmap=wx.Bitmap(img)) browse_btn = wx.Button(self, label='Browse') @@ -39,7 +39,7 @@ def on_browse(self, event): wildcard=wildcard, style=wx.ID_OPEN) as dialog: if dialog.ShowModal() == wx.ID_OK: - self.photo_txt.SetValue(dialog.GetPath()) + self.photo_txt.SetValue(dialog.GetPaths()[0]) self.load_image() def load_image(self):