mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] Node: duplicates button improvement but still perf issues
As described in the comment, for an unknown reason, the icon seems to make the UI slow in some cases but not always.
This commit is contained in:
parent
8281f8cb2a
commit
06b821349f
1 changed files with 17 additions and 4 deletions
|
@ -177,17 +177,30 @@ Item {
|
|||
spacing: 2
|
||||
|
||||
// Data sharing indicator
|
||||
// Note: for an unknown reason, there are some performance issues with the UI refresh.
|
||||
// Example: a node duplicated 40 times will be slow while creating another identical node
|
||||
// (sharing the same uid) will not be as slow. If save, quit and reload, it will become slow.
|
||||
MaterialToolButton {
|
||||
visible: node.duplicates.count > 0
|
||||
property string baseText: "<b>Shares internal folder (data) with other node(s). Click for details.</b>"
|
||||
property string toolTipText: visible ? baseText : ""
|
||||
visible: node.hasDuplicates
|
||||
text: MaterialIcons.layers
|
||||
font.pointSize: 7
|
||||
padding: 2
|
||||
palette.text: Colors.sysPalette.text
|
||||
ToolTip.text: visible ? "<b>Shares internal folder (data) with other node(s). Click for details.</b>" : ""
|
||||
ToolTip.text: toolTipText
|
||||
|
||||
onPressed: ToolTip.text = visible ? generateDuplicateList() : ""
|
||||
onReleased: ToolTip.text = visible ? "<b>Shares internal folder (data) with other node(s). Click for details.</b>" : ""
|
||||
onPressed: { offsetReleased.running = false; toolTipText = visible ? generateDuplicateList() : "" }
|
||||
onReleased: { toolTipText = "" ; offsetReleased.running = true }
|
||||
onCanceled: released()
|
||||
|
||||
// Used for a better user experience with the button
|
||||
// Avoid to change the text too quickly
|
||||
Timer {
|
||||
id: offsetReleased
|
||||
interval: 1000; running: false; repeat: false
|
||||
onTriggered: parent.toolTipText = visible ? parent.baseText : ""
|
||||
}
|
||||
}
|
||||
|
||||
// Submitted externally indicator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue