Disable parallelization on erase tool for now
This commit is contained in:
parent
3486d534b2
commit
c48531238e
3 changed files with 4 additions and 4 deletions
2
android-project/.gitignore
vendored
2
android-project/.gitignore
vendored
|
|
@ -34,3 +34,5 @@ google-services.json
|
||||||
|
|
||||||
# Android Profiling
|
# Android Profiling
|
||||||
*.hprof
|
*.hprof
|
||||||
|
|
||||||
|
app/release
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
#include "../CanvasComponents/ImageCanvasComponent.hpp"
|
#include "../CanvasComponents/ImageCanvasComponent.hpp"
|
||||||
#include "Layers/DrawingProgramLayer.hpp"
|
#include "Layers/DrawingProgramLayer.hpp"
|
||||||
#include "Layers/DrawingProgramLayerListItem.hpp"
|
#include "Layers/DrawingProgramLayerListItem.hpp"
|
||||||
#include <Helpers/Parallel.hpp>
|
|
||||||
#include "../ScaleUpCanvas.hpp"
|
#include "../ScaleUpCanvas.hpp"
|
||||||
|
|
||||||
#include "Tools/EraserTool.hpp"
|
#include "Tools/EraserTool.hpp"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
#include "../../GUIStuff/ElementHelpers/RadioButtonHelpers.hpp"
|
#include "../../GUIStuff/ElementHelpers/RadioButtonHelpers.hpp"
|
||||||
#include "../../GUIStuff/ElementHelpers/CheckBoxHelpers.hpp"
|
#include "../../GUIStuff/ElementHelpers/CheckBoxHelpers.hpp"
|
||||||
#include "Helpers/NetworkingObjects/NetObjOrderedList.hpp"
|
#include "Helpers/NetworkingObjects/NetObjOrderedList.hpp"
|
||||||
#include "Helpers/Parallel.hpp"
|
|
||||||
|
|
||||||
EraserTool::EraserTool(DrawingProgram& initDrawP):
|
EraserTool::EraserTool(DrawingProgram& initDrawP):
|
||||||
DrawingProgramToolBase(initDrawP)
|
DrawingProgramToolBase(initDrawP)
|
||||||
|
|
@ -224,7 +223,7 @@ void EraserTool::commit_erase() {
|
||||||
bool placedNewObject = false;
|
bool placedNewObject = false;
|
||||||
std::unordered_map<DrawingProgramLayerListItem*, std::vector<std::pair<CanvasComponentContainer::ObjInfoIterator, CanvasComponentContainer*>>> newObjectsToPlace;
|
std::unordered_map<DrawingProgramLayerListItem*, std::vector<std::pair<CanvasComponentContainer::ObjInfoIterator, CanvasComponentContainer*>>> newObjectsToPlace;
|
||||||
|
|
||||||
parallel_loop_container_mutable(updatedComponents, [&](auto& compPair) {
|
std::for_each(updatedComponents.begin(), updatedComponents.end(), [&](auto& compPair) {
|
||||||
compPair.second.splitComps = compPair.first->obj->get_comp().attempt_split(drawP);
|
compPair.second.splitComps = compPair.first->obj->get_comp().attempt_split(drawP);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -253,7 +252,7 @@ void EraserTool::commit_erase() {
|
||||||
if(objectsToErase)
|
if(objectsToErase)
|
||||||
drawP.layerMan.erase_component_container(erasedComponents, !placedNewObject);
|
drawP.layerMan.erase_component_container(erasedComponents, !placedNewObject);
|
||||||
bool first = !objectsToErase && !placedNewObject;
|
bool first = !objectsToErase && !placedNewObject;
|
||||||
parallel_loop_container(updatedComponents, [&](auto& compPair) {
|
std::for_each(updatedComponents.begin(), updatedComponents.end(), [&](auto& compPair) {
|
||||||
auto& [comp, oldData] = compPair;
|
auto& [comp, oldData] = compPair;
|
||||||
comp->obj->get_comp().simplify_paths();
|
comp->obj->get_comp().simplify_paths();
|
||||||
comp->obj->normalize_object_coordinates();
|
comp->obj->normalize_object_coordinates();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue