Skip to content

Commit 45fabe3

Browse files
committed
Little dirty fix for minefield_app.
1 parent 0697950 commit 45fabe3

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

examples/minefield_app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,14 @@ def explosion(self, cell):
251251
self.mine_matrix[y][x].style['background-color'] = 'red'
252252
self.mine_matrix[y][x].check_mine(None, False)
253253
self.mine_table.empty()
254-
self.mine_table.append_from_list(self.mine_matrix, False)
254+
255+
#self.mine_table.append_from_list(self.mine_matrix, False)
256+
for x in range(0, len(self.mine_matrix[0])):
257+
row = gui.TableRow()
258+
for y in range(0, len(self.mine_matrix)):
259+
row.append(self.mine_matrix[y][x])
260+
self.mine_matrix[y][x].onclick.connect(self.mine_matrix[y][x].check_mine)
261+
self.mine_table.append(row)
255262

256263

257264
if __name__ == "__main__":

examples/widgets_overview_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,4 @@ def on_close(self):
326326
# optional parameters
327327
# start(MyApp,address='127.0.0.1', port=8081, multiple_instance=False,enable_file_cache=True, update_interval=0.1, start_browser=True)
328328
import ssl
329-
start(MyApp, debug=True, address='0.0.0.0', port=8081, start_browser=True, multiple_instance=False)
329+
start(MyApp, debug=True, address='0.0.0.0', port=8081, start_browser=True, multiple_instance=True)

0 commit comments

Comments
 (0)