mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 02:40:39 +01:00
bin/pick: When the main widget is replaced, trigger a redraw
The docs clearly say this, and though it used to just work that seems to
have been a coincidence rather than being correct.
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39459>
(cherry picked from commit 0380c1228e)
This commit is contained in:
parent
b317162543
commit
1ed4f69065
2 changed files with 8 additions and 1 deletions
|
|
@ -3524,7 +3524,7 @@
|
|||
"description": "bin/pick: When the main widget is replaced, trigger a redraw",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ class UI:
|
|||
if commit.nominated and commit.resolution is core.Resolution.UNRESOLVED:
|
||||
b = urwid.AttrMap(CommitWidget(self, commit), None, focus_map='reversed')
|
||||
self.commit_list.append(b)
|
||||
self.mainloop.draw_screen()
|
||||
self.save()
|
||||
|
||||
async def feedback(self, text: str) -> None:
|
||||
|
|
@ -236,6 +237,7 @@ class UI:
|
|||
if c.base_widget is commit:
|
||||
del self.commit_list[i]
|
||||
break
|
||||
self.mainloop.draw_screen()
|
||||
|
||||
def save(self):
|
||||
core.save(itertools.chain(self.new_commits, self.previous_commits))
|
||||
|
|
@ -246,6 +248,7 @@ class UI:
|
|||
|
||||
def reset_cb(_) -> None:
|
||||
self.mainloop.widget = o
|
||||
self.mainloop.draw_screen()
|
||||
|
||||
async def apply_cb(edit: urwid.Edit) -> None:
|
||||
text: str = edit.get_edit_text()
|
||||
|
|
@ -263,6 +266,7 @@ class UI:
|
|||
raise RuntimeError(f"Couldn't find {sha}")
|
||||
|
||||
await commit.apply(self)
|
||||
self.mainloop.draw_screen()
|
||||
|
||||
q = urwid.Edit("Commit sha\n")
|
||||
ok_btn = urwid.Button('Ok')
|
||||
|
|
@ -279,12 +283,14 @@ class UI:
|
|||
self.mainloop.widget = urwid.Overlay(
|
||||
urwid.Filler(box), o, 'center', ('relative', 50), 'middle', ('relative', 50)
|
||||
)
|
||||
self.mainloop.draw_screen()
|
||||
|
||||
def chp_failed(self, commit: 'CommitWidget', err: str) -> None:
|
||||
o = self.mainloop.widget
|
||||
|
||||
def reset_cb(_) -> None:
|
||||
self.mainloop.widget = o
|
||||
self.mainloop.draw_screen()
|
||||
|
||||
t = urwid.Text(textwrap.dedent(f"""
|
||||
Failed to apply {commit.commit.sha} {commit.commit.description} with the following error:
|
||||
|
|
@ -313,3 +319,4 @@ class UI:
|
|||
self.mainloop.widget = urwid.Overlay(
|
||||
urwid.Filler(box), o, 'center', ('relative', 50), 'middle', ('relative', 50)
|
||||
)
|
||||
self.mainloop.draw_screen()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue