mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
fixed crash when undoing node creation + fixed highlighting
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
|
||||
- TODO
|
||||
|
||||
# 0.33.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed occasional crash when undoing node creation
|
||||
- Fixed highlighting for objects that were cloned
|
||||
|
||||
# 0.33
|
||||
|
||||
## Added
|
||||
|
||||
@@ -205,9 +205,11 @@ impl SceneRenderPass for HighlightRenderPass {
|
||||
};
|
||||
|
||||
for &root_node_handle in self.nodes_to_highlight.iter() {
|
||||
for node_handle in ctx.scene.graph.traverse_handle_iter(root_node_handle) {
|
||||
if let Some(node) = ctx.scene.graph.try_get(node_handle) {
|
||||
node.collect_render_data(&mut render_context);
|
||||
if ctx.scene.graph.is_valid_handle(root_node_handle) {
|
||||
for node_handle in ctx.scene.graph.traverse_handle_iter(root_node_handle) {
|
||||
if let Some(node) = ctx.scene.graph.try_get(node_handle) {
|
||||
node.collect_render_data(&mut render_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-13
@@ -830,6 +830,16 @@ impl SceneController for GameScene {
|
||||
self.camera_controller
|
||||
.update(&mut scene.graph, settings, path, dt);
|
||||
|
||||
let mut highlighter = self.highlighter.borrow_mut();
|
||||
highlighter.nodes_to_highlight.clear();
|
||||
|
||||
highlighter.scene_handle = self.scene;
|
||||
if let Selection::Graph(ref selection) = editor_selection {
|
||||
for &handle in selection.nodes() {
|
||||
highlighter.nodes_to_highlight.insert(handle);
|
||||
}
|
||||
}
|
||||
|
||||
new_render_target
|
||||
}
|
||||
|
||||
@@ -881,19 +891,6 @@ impl SceneController for GameScene {
|
||||
));
|
||||
false
|
||||
}
|
||||
Message::SelectionChanged { .. } => {
|
||||
let mut highlighter = self.highlighter.borrow_mut();
|
||||
highlighter.nodes_to_highlight.clear();
|
||||
|
||||
highlighter.scene_handle = self.scene;
|
||||
if let Selection::Graph(ref selection) = selection {
|
||||
for &handle in selection.nodes() {
|
||||
highlighter.nodes_to_highlight.insert(handle);
|
||||
}
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
Message::ProvideSceneHierarchy { view } => {
|
||||
let scene = &engine.scenes[self.scene];
|
||||
engine
|
||||
|
||||
Reference in New Issue
Block a user