Merge branch 'mbruce/bugfixes' into 'develop'
fixed bug where someone could nil out attributedText and resetting the text... See merge request BPHV_MIPS/vds_ios!152
This commit is contained in:
commit
e6f9b96f5f
@ -135,15 +135,15 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
|||||||
override open var text: String? {
|
override open var text: String? {
|
||||||
get { _text }
|
get { _text }
|
||||||
set {
|
set {
|
||||||
if _text != newValue {
|
if _text != newValue || newValue != attributedText?.string {
|
||||||
_text = newValue
|
_text = newValue
|
||||||
useAttributedText = false
|
useAttributedText = false
|
||||||
attributes = nil
|
attributes?.removeAll()
|
||||||
setNeedsUpdate()
|
setNeedsUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the View is enabled or not.
|
/// Whether the View is enabled or not.
|
||||||
open override var isEnabled: Bool { didSet { setNeedsUpdate() } }
|
open override var isEnabled: Bool { didSet { setNeedsUpdate() } }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user