Revert "Change timing to update print preview"

This reverts commit 9da74021f4.
This commit is contained in:
1024jp 2022-06-29 09:02:50 +09:00
parent 9da74021f4
commit 957e261e27
2 changed files with 4 additions and 11 deletions

View File

@ -23,7 +23,6 @@ Change Log
### Fixes
- Fix memory leak on closing documents.
- [trivial] Fix an issue on macOS 13 Monterey (beta) that the print preview was not updated even when settings changed.

View File

@ -171,9 +171,12 @@ final class PrintTextView: NSTextView, Themable, URLDetectable {
/// return the number of pages available for printing
override func knowsPageRange(_ range: NSRangePointer) -> Bool {
// apply print settings
self.applyPrintSettings()
// adjust content size based on print setting
if let paperContentSize = NSPrintOperation.current?.printInfo.paperContentSize,
self.lastPaperContentSize != paperContentSize
self.lastPaperContentSize != paperContentSize
{
self.lastPaperContentSize = paperContentSize
self.frame.size = paperContentSize
@ -184,15 +187,6 @@ final class PrintTextView: NSTextView, Themable, URLDetectable {
}
override func viewWillDraw() {
super.viewWillDraw()
// apply print settings
self.applyPrintSettings()
}
/// draw
override func draw(_ dirtyRect: NSRect) {