1.11 (#492)
* Shade estimated territory (#488) * prune branch, icons * Tsumego frame (#506) * straighten quotes * Bump pillow from 9.0.0 to 9.0.1 (#511) * Bump pillow from 8.3.2 to 9.0.0 (#500) * Add option to display higher precision point loss values (#514) * fix mac build (#516) * drop 3.6 support * new katago Co-authored-by: Miles Crawford <miles@milescrawford.com> Co-authored-by: kaorahi <38910552+kaorahi@users.noreply.github.com> Co-authored-by: Hiraoka <khi@users.osdn.me> Co-authored-by: Zironic <Tony-Liou@users.noreply.github.com> Co-authored-by: pdeblanc <peter@spaceandgames.com> Co-authored-by: Dontbtme <66470440+Dontbtme@users.noreply.github.com>
This commit is contained in:
51 files changed
+2016
-271
No files matched your search
@@ -232,7 +232,7 @@ Builder.load_string(
|
||||
padding_x: 15
|
||||
height: '40dp'
|
||||
size_hint_x: None
|
||||
text: root.select_string
|
||||
text: i18n._(root.select_string)
|
||||
on_release: root.button_clicked()
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -84,6 +84,16 @@ class MoveTreeCanvas(Widget):
|
||||
self.set_game_node(parent)
|
||||
self.is_open = False
|
||||
|
||||
def prune_branch(self):
|
||||
selected_node = self.menu_selected_node
|
||||
if selected_node and selected_node.parent:
|
||||
node = selected_node
|
||||
while node.parent is not None:
|
||||
node.parent.children = [node]
|
||||
node = node.parent
|
||||
self.set_game_node(selected_node)
|
||||
self.is_open = False
|
||||
|
||||
def make_selected_node_main_branch(self):
|
||||
selected_node = self.menu_selected_node or self.scroll_view_widget.current_node
|
||||
if selected_node and selected_node.parent:
|
||||
@@ -229,6 +239,10 @@ class MoveTree(ScrollView, BackgroundMixin):
|
||||
self.move_tree_canvas.delete_selected_node()
|
||||
self.redraw_tree_trigger()
|
||||
|
||||
def prune_branch(self):
|
||||
self.move_tree_canvas.prune_branch()
|
||||
self.redraw_tree_trigger()
|
||||
|
||||
def make_selected_node_main_branch(self):
|
||||
self.move_tree_canvas.make_selected_node_main_branch()
|
||||
self.redraw_tree_trigger()
|
||||
@@ -306,5 +320,12 @@ Builder.load_string(
|
||||
-background_color: Theme.LIGHTER_BACKGROUND_COLOR
|
||||
-height: dp(45)
|
||||
-width_margin: 1.6
|
||||
MoveTreeDropdownItem:
|
||||
text: i18n._("Prune Branch")
|
||||
icon: 'Prune.png'
|
||||
on_action: root.katrain.controls.move_tree.prune_branch()
|
||||
-background_color: Theme.LIGHTER_BACKGROUND_COLOR
|
||||
-height: dp(45)
|
||||
-width_margin: 1.6
|
||||
"""
|
||||
)
|
||||
Reference in new issue
Block a user