mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-19 23:27:42 +03:00
Revert "Change timing to update print preview"
This reverts commit 9da74021f4
.
This commit is contained in:
parent
9da74021f4
commit
957e261e27
@ -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.
|
||||
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user