mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Ensure we flush iff it is needed
This commit is contained in:
parent
a3f1c71d97
commit
d1312c66e1
@ -415,7 +415,7 @@ public class EditSession implements Extent, AutoCloseable {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!batchingChunks) {
|
||||
if (!batchingChunks && isBatchingChunks()) {
|
||||
flushSession();
|
||||
}
|
||||
chunkBatchingExtent.setEnabled(batchingChunks);
|
||||
@ -428,9 +428,15 @@ public class EditSession implements Extent, AutoCloseable {
|
||||
* @see #setBatchingChunks(boolean)
|
||||
*/
|
||||
public void disableBuffering() {
|
||||
// We optimize here to avoid double calls to flushSession.
|
||||
// We optimize here to avoid repeated calls to flushSession.
|
||||
boolean needsFlush = isQueueEnabled() || isBatchingChunks();
|
||||
if (needsFlush) {
|
||||
flushSession();
|
||||
}
|
||||
reorderExtent.setEnabled(false);
|
||||
setBatchingChunks(false);
|
||||
if (chunkBatchingExtent != null) {
|
||||
chunkBatchingExtent.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user