forked from osmocom/wireshark
Qt: Set the LabelStack CSS only when it changes.
We call fillLabel repeatedly while loading a capture. Try to avoid applying a style sheet when we do since it can affect performance. Change-Id: I9ee188cb79f7cad340ba35b12011b82004ed8262 Reviewed-on: https://code.wireshark.org/review/16571 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
ad6fc87d64
commit
97d194cd3c
|
@ -77,7 +77,10 @@ void LabelStack::fillLabel() {
|
|||
}
|
||||
|
||||
style_sheet += "}";
|
||||
setStyleSheet(style_sheet);
|
||||
if (styleSheet().size() != style_sheet.size()) {
|
||||
// Can be computationally expensive.
|
||||
setStyleSheet(style_sheet);
|
||||
}
|
||||
setText(si.text);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue