mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 02:26:29 +03:00
Minor optimization.
--HG-- branch : dev
This commit is contained in:
@@ -33,7 +33,8 @@ enum UIFlag {
|
||||
UI_ANCHOR_LEFT = (1 << 16),
|
||||
UI_ANCHOR_RIGHT = (1 << 17),
|
||||
UI_TOUCH_DRAG_ENABLED = (1 << 18),
|
||||
UI_TEXT_SELECTION_ENABLED = (1 << 19)
|
||||
UI_TEXT_SELECTION_ENABLED = (1 << 19),
|
||||
UI_ATTRIBUTE_CHANGED = (1 << 20)
|
||||
};
|
||||
|
||||
enum UINodeType {
|
||||
|
||||
@@ -406,6 +406,8 @@ void UIWidget::notifyLayoutAttrChange() {
|
||||
if ( 0 == mAttributesTransactionCount ) {
|
||||
NodeMessage msg( this, NodeMessage::LayoutAttributeChange );
|
||||
messagePost( &msg );
|
||||
} else {
|
||||
mFlags |= UI_ATTRIBUTE_CHANGED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -756,7 +758,11 @@ void UIWidget::endAttributesTransaction() {
|
||||
mAttributesTransactionCount--;
|
||||
|
||||
if ( 0 == mAttributesTransactionCount ) {
|
||||
notifyLayoutAttrChange();
|
||||
if ( mFlags & UI_ATTRIBUTE_CHANGED ) {
|
||||
notifyLayoutAttrChange();
|
||||
|
||||
mFlags &= ~UI_ATTRIBUTE_CHANGED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user