Update values in viewWillDraw in PrintTextView

This commit is contained in:
1024jp 2017-11-20 23:19:26 +09:00
parent 3ecfa16ca7
commit 7a646cf430

View File

@ -115,10 +115,17 @@ final class PrintTextView: NSTextView, NSLayoutManagerDelegate, Themable {
}
/// draw
override func draw(_ dirtyRect: NSRect) {
/// prepare for drawing
override func viewWillDraw() {
super.viewWillDraw()
self.loadPrintSettings()
}
/// draw
override func draw(_ dirtyRect: NSRect) {
// store graphics state to keep line number area drawable
// -> Otherwise, line numbers can be cropped. (2016-03 by 1024jp)