Reliable channel used to finalize component updates

This commit is contained in:
Yousef Khadadeh 2025-10-01 08:59:44 +03:00
parent 14c6e7ceac
commit 278792a0ff
11 changed files with 36 additions and 28 deletions

View file

@ -141,7 +141,7 @@ void BrushTool::tool_update() {
if((!controls.drawingMinimumRelativeToSize && distToPrev >= 10.0) || (controls.drawingMinimumRelativeToSize && distToPrev >= drawP.controls.relativeWidth * DRAW_MINIMUM_LIMIT)) {
controls.intermediateItem->d->points.back() = p;
controls.addedTemporaryPoint = false;
controls.intermediateItem->client_send_update(drawP);
controls.intermediateItem->client_send_update(drawP, false);
if(controls.midwayInterpolation) {
if(controls.intermediateItem->d->points.size() != 2) // Don't interpolate the first point
@ -175,7 +175,7 @@ bool BrushTool::prevent_undo_or_redo() {
void BrushTool::commit_stroke() {
if(controls.intermediateItem && controls.intermediateItem->collabListInfo.lock()) {
if(!controls.intermediateItem->d->points.empty()) {
controls.intermediateItem->client_send_update(drawP);
controls.intermediateItem->client_send_update(drawP, true);
controls.intermediateItem->commit_update(drawP);
}
}