Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-07-18 17:51:57 +0300
committerJulian Eisel <julian@blender.org>2022-07-19 17:31:23 +0300
commit348ec37f52452614cb26baa8be40a161e1446b15 (patch)
tree0aac15385fab65929f8243702f974451aa5087b9 /source/blender/editors/interface/abstract_view_item.cc
parent2f834bfc14824c224f99ab7d9a9e561fa86aef6b (diff)
UI: Add AbstractViewItem base class
No user visible changes expected. Similar to rBc355be6faeac, but for view items now instead of the view. Not much of the item code is ported to use it yet, it's actually a bit tricky for the most part. But just introducing the base class already allows me to start unifying the view item buttons (`uiButTreeRow` and `uiButGridTile`). This would be a nice improvement.
Diffstat (limited to 'source/blender/editors/interface/abstract_view_item.cc')
-rw-r--r--source/blender/editors/interface/abstract_view_item.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/interface/abstract_view_item.cc b/source/blender/editors/interface/abstract_view_item.cc
new file mode 100644
index 00000000000..fc71dbe8b95
--- /dev/null
+++ b/source/blender/editors/interface/abstract_view_item.cc
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/** \file
+ * \ingroup edinterface
+ */
+
+#include "UI_abstract_view.hh"
+
+namespace blender::ui {
+
+/* ---------------------------------------------------------------------- */
+/** \name View Reconstruction
+ * \{ */
+
+void AbstractViewItem::update_from_old(const AbstractViewItem &old)
+{
+ is_active_ = old.is_active_;
+}
+
+/** \} */
+
+} // namespace blender::ui