Improve performance for all tools
This commit is contained in:
parent
0a474c16a0
commit
22e04b0ca5
17 changed files with 76 additions and 38 deletions
|
|
@ -225,8 +225,8 @@ void BrushTool::tool_update() {
|
|||
|
||||
if(commitUpdate && objInfoBeingEdited) {
|
||||
NetworkingObjects::NetObjOwnerPtr<CanvasComponentContainer>& containerPtr = objInfoBeingEdited->obj;
|
||||
containerPtr->send_comp_update(drawP, false);
|
||||
containerPtr->commit_update(drawP);
|
||||
containerPtr->send_comp_update(drawP, false);
|
||||
commitUpdate = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -237,6 +237,7 @@ void BrushTool::commit_stroke() {
|
|||
fix_tip();
|
||||
containerPtr->commit_update(drawP);
|
||||
containerPtr->send_comp_update(drawP, true);
|
||||
commitUpdate = false;
|
||||
if(containerPtr->get_world_bounds().has_value())
|
||||
drawP.layerMan.add_undo_place_component(objInfoBeingEdited);
|
||||
else {
|
||||
|
|
@ -244,7 +245,6 @@ void BrushTool::commit_stroke() {
|
|||
components->erase(components, containerPtr->objInfo);
|
||||
}
|
||||
objInfoBeingEdited = nullptr;
|
||||
commitUpdate = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue