forked from 1b-agent/opencadstudio-upstream
perf: optimize large drawing workflows
This commit is contained in:
1 parent
1c7e4bb850
commit
71e0b88839
17 files changed
+1204
-430
No files matched your search
@@ -117,6 +117,7 @@ impl OpenCADStudio {
|
||||
|
||||
fn push_undo_entry(&mut self, i: usize, snapshot: HistorySnapshot) {
|
||||
self.tabs[i].history.undo_stack.push(snapshot);
|
||||
self.tabs[i].edit_revision = self.tabs[i].edit_revision.wrapping_add(1);
|
||||
self.clear_redo_history(i);
|
||||
self.trim_history(i);
|
||||
}
|
||||
@@ -480,6 +481,7 @@ impl OpenCADStudio {
|
||||
had_full: bool,
|
||||
changes: &[(Handle, crate::scene::ChangeKind)],
|
||||
) {
|
||||
self.tabs[i].edit_revision = self.tabs[i].edit_revision.wrapping_add(1);
|
||||
{
|
||||
let scene = &mut self.tabs[i].scene;
|
||||
if had_full {
|
||||
|
||||
Reference in new issue
Block a user