Merge branch 'blender-v4.0-release'

This commit is contained in:
Julian Eisel
2023-10-13 16:17:11 +02:00
2 changed files with 0 additions and 29 deletions

View File

@@ -245,7 +245,6 @@ class AbstractTreeViewItem : public AbstractViewItem, public TreeViewItemContain
private:
static void tree_row_click_fn(bContext *, void *, void *);
static void collapse_chevron_click_fn(bContext *, void *but_arg1, void *);
static bool is_collapse_chevron_but(const uiBut *but);
/**
* Override of #AbstractViewItem::set_state_active() that also ensures the parents of this

View File

@@ -361,12 +361,6 @@ void AbstractTreeViewItem::collapse_chevron_click_fn(bContext *C,
}
}
bool AbstractTreeViewItem::is_collapse_chevron_but(const uiBut *but)
{
return but->type == UI_BTYPE_BUT_TOGGLE && ELEM(but->icon, ICON_TRIA_RIGHT, ICON_TRIA_DOWN) &&
(but->func == collapse_chevron_click_fn);
}
void AbstractTreeViewItem::add_collapse_chevron(uiBlock &block) const
{
if (!is_collapsible()) {
@@ -379,9 +373,6 @@ void AbstractTreeViewItem::add_collapse_chevron(uiBlock &block) const
/* Note that we're passing the tree-row button here, not the chevron one. */
UI_but_func_set(but, collapse_chevron_click_fn, nullptr, nullptr);
UI_but_flag_disable(but, UI_BUT_UNDO);
/* Check if the query for the button matches the created button. */
BLI_assert(is_collapse_chevron_but(but));
}
void AbstractTreeViewItem::add_rename_button(uiLayout &row)
@@ -577,8 +568,6 @@ class TreeViewLayoutBuilder {
private:
/* Created through #TreeViewBuilder (friend class). */
TreeViewLayoutBuilder(uiLayout &layout);
static void polish_layout(const uiBlock &block);
};
TreeViewLayoutBuilder::TreeViewLayoutBuilder(uiLayout &layout) : block_(*uiLayoutGetBlock(&layout))
@@ -599,22 +588,6 @@ void TreeViewLayoutBuilder::build_from_tree(const AbstractTreeView &tree_view)
UI_block_layout_set_current(&block(), &parent_layout);
}
void TreeViewLayoutBuilder::polish_layout(const uiBlock &block)
{
LISTBASE_FOREACH_BACKWARD (uiBut *, but, &block.buttons) {
if (AbstractTreeViewItem::is_collapse_chevron_but(but) && but->next &&
/* Embossed buttons with padding-less text padding look weird, so don't touch them. */
ELEM(but->next->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS))
{
UI_but_drawflag_enable(static_cast<uiBut *>(but->next), UI_BUT_NO_TEXT_PADDING);
}
if (but->type == UI_BTYPE_VIEW_ITEM) {
break;
}
}
}
void TreeViewLayoutBuilder::build_row(AbstractTreeViewItem &item) const
{
uiBlock &block_ = block();
@@ -649,7 +622,6 @@ void TreeViewLayoutBuilder::build_row(AbstractTreeViewItem &item) const
else {
item.build_row(*row);
}
polish_layout(block_);
UI_block_emboss_set(&block_, previous_emboss);
UI_block_layout_set_current(&block_, &prev_layout);