Skip to content
This repository was archived by the owner on Dec 3, 2020. It is now read-only.

Commit 73db351

Browse files
committed
Faster box resizing when there are lots of boxes
1 parent 0114be1 commit 73db351

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/NBEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void CDR::update(NBEditor* editor, bool drag, rect<s32> offset)
339339
} else {
340340
box->moveNodeBox(editor->state, actualType, wpos);
341341
}
342-
node->remesh();
342+
node->remesh(box);
343343

344344
editor->triggerCDRmoved();
345345
}

src/Node.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ void Node::remesh() {
107107
}
108108
}
109109

110+
void Node::remesh(NodeBox *box) {
111+
box->buildNode(state, position, device, images);
112+
}
113+
110114
void Node::hide()
111115
{
112116
for (std::vector<NodeBox*>::iterator it = boxes.begin();

src/Node.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Node
2727

2828
// Node bulk updaters
2929
void remesh(); // creates the node mesh
30+
void remesh(NodeBox *box);
3031
void setAllTextures(Media::Image *def);
3132
void hide();
3233

0 commit comments

Comments
 (0)