Skip to content

Commit

Permalink
Fix: Minor viewport flickers
Browse files Browse the repository at this point in the history
  • Loading branch information
SonarSonic committed Apr 21, 2024
1 parent 55044bb commit 62b37c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/drawingbot/plotting/PFMTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ public final PlottedDrawing call() {
if(!isSubTask && !isCancelled()){
Platform.runLater(() -> {
//Switch from rendering the task to rendering the generated drawing
context.taskManager.setCurrentDrawing(drawing);
context.taskManager.setActiveTask(null);
context.taskManager.setRenderedTask(null);
context.taskManager.setCurrentDrawing(drawing);
});
}
safeDestroy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public void init() {
setDisplayedImage(imageFilteringService.getFilteredImage());
setDisplayCanvas(imageFilteringService.getFilteredCanvas());
imageChanged = true;
getViewport().getRenderFlags().setFlag(Flags.FORCE_REDRAW, true);
if(isActive()){
getViewport().getRenderFlags().setFlag(Flags.FORCE_REDRAW, true);
}
});
}

Expand Down

0 comments on commit 62b37c7

Please sign in to comment.