feat(gui): Add UI button to promote active take to a new session
This commit is contained in:
13
src/gui_2.py
13
src/gui_2.py
@@ -2319,6 +2319,19 @@ def hello():
|
|||||||
self._switch_discussion(name)
|
self._switch_discussion(name)
|
||||||
imgui.end_tab_item()
|
imgui.end_tab_item()
|
||||||
imgui.end_tab_bar()
|
imgui.end_tab_bar()
|
||||||
|
|
||||||
|
if "_take_" in self.active_discussion:
|
||||||
|
if imgui.button("Promote Take"):
|
||||||
|
base_name = self.active_discussion.split("_take_")[0]
|
||||||
|
new_name = f"{base_name}_promoted"
|
||||||
|
counter = 1
|
||||||
|
while new_name in names:
|
||||||
|
new_name = f"{base_name}_promoted_{counter}"
|
||||||
|
counter += 1
|
||||||
|
project_manager.promote_take(self.project, self.active_discussion, new_name)
|
||||||
|
self._switch_discussion(new_name)
|
||||||
|
imgui.same_line()
|
||||||
|
|
||||||
if self.active_track:
|
if self.active_track:
|
||||||
imgui.same_line()
|
imgui.same_line()
|
||||||
changed, self._track_discussion_active = imgui.checkbox("Track Discussion", self._track_discussion_active)
|
changed, self._track_discussion_active = imgui.checkbox("Track Discussion", self._track_discussion_active)
|
||||||
|
|||||||
Reference in New Issue
Block a user