Skip to content

Commit dcb225f

Browse files
committed
No longer reset path bar when clicking on a path button
1 parent 6e21a19 commit dcb225f

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ Documentation
123123
Changelog
124124
---------
125125

126+
- tkfilebrowser 2.2.6
127+
* No longer reset path bar when clicking on a path button
128+
126129
- tkfilebrowser 2.2.5
127130
* Add compatibility with Tk < 8.6.0 (requires PIL.ImageTk)
128131
* Add desktop icon in shortcuts

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
tkfilebrowser 2.2.6
5+
-------------------
6+
7+
* No longer reset path bar when clicking on a path button
8+
49
tkfilebrowser 2.2.5
510
-------------------
611

tkfilebrowser/filebrowser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,15 +962,15 @@ def _update_path_bar(self, path):
962962
else:
963963
folders = path.split("/")
964964
b = PathButton(self.path_bar, self.path_var, "/", image=self.im_drive,
965-
command=lambda: self.display_folder("/"))
965+
command=lambda: self.display_folder("/", update_bar=False))
966966
self.path_bar_buttons.append(b)
967967
b.grid(row=0, column=1, sticky="ns")
968968
p = "/"
969969
for i, folder in enumerate(folders[1:]):
970970
p = join(p, folder)
971971
b = PathButton(self.path_bar, self.path_var, p, text=folder,
972972
width=len(folder) + 1,
973-
command=lambda f=p: self.display_folder(f),
973+
command=lambda f=p: self.display_folder(f, update_bar=False),
974974
style="path.tkfilebrowser.TButton")
975975
self.path_bar_buttons.append(b)
976976
b.grid(row=0, column=i + 2, sticky="ns")

0 commit comments

Comments
 (0)