Fixes incorrect cheat code formatting
This commit is contained in:
parent
9dc823f25c
commit
427ec9da73
@ -183,9 +183,12 @@ extension EditCheatViewController
|
|||||||
if let superview = self.codeTextView.superview
|
if let superview = self.codeTextView.superview
|
||||||
{
|
{
|
||||||
let layoutMargins = superview.layoutMargins
|
let layoutMargins = superview.layoutMargins
|
||||||
self.codeTextView.textContainerInset = layoutMargins
|
if self.codeTextView.textContainerInset.left != layoutMargins.left
|
||||||
|
{
|
||||||
self.codeTextView.textContainer.lineFragmentPadding = 0
|
self.codeTextView.textContainerInset.left = layoutMargins.left // Don't change right inset because CheatTextView adjusts it as well.
|
||||||
|
self.codeTextView.textContainer.lineFragmentPadding = 0
|
||||||
|
self.codeTextView.setNeedsLayout()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.isAppearing && !self.isPreviewing
|
if self.isAppearing && !self.isPreviewing
|
||||||
@ -252,6 +255,8 @@ private extension EditCheatViewController
|
|||||||
|
|
||||||
self.tableView.endUpdates()
|
self.tableView.endUpdates()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.view.setNeedsLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateSaveButtonState()
|
func updateSaveButtonState()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user