mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 02:12:04 +02:00
[ui] add 'Message' structure to wrap high-level messages
* fix random segfault due to signals with 2+ arguments (PySide bug) * group Connections to '_reconstruction' instance
This commit is contained in:
parent
634eec5914
commit
b46520009f
2 changed files with 39 additions and 24 deletions
|
@ -197,22 +197,6 @@ ApplicationWindow {
|
|||
id: dialogsFactory
|
||||
}
|
||||
|
||||
// Bind log messages to DialogsFactory
|
||||
Connections {
|
||||
target: _reconstruction
|
||||
function createDialog(func, args)
|
||||
{
|
||||
var dialog = func(_window)
|
||||
// Set text afterwards to avoid dialog sizing issues
|
||||
dialog.title = args[0]
|
||||
dialog.text = args[1]
|
||||
dialog.detailedText = args[2]
|
||||
}
|
||||
// onInfo: createDialog(dialogsFactory.info, arguments)
|
||||
// onWarning: createDialog(dialogsFactory.warning, arguments)
|
||||
// onError: createDialog(dialogsFactory.error, arguments)
|
||||
}
|
||||
|
||||
Action {
|
||||
id: undoAction
|
||||
|
||||
|
@ -316,6 +300,20 @@ ApplicationWindow {
|
|||
0,
|
||||
graphEditor.boundingBox().height + graphEditor.gridSpacing
|
||||
)
|
||||
|
||||
// Bind messages to DialogsFactory
|
||||
function createDialog(func, message)
|
||||
{
|
||||
var dialog = func(_window)
|
||||
// Set text afterwards to avoid dialog sizing issues
|
||||
dialog.title = message.title
|
||||
dialog.text = message.text
|
||||
dialog.detailedText = message.detailedText
|
||||
}
|
||||
|
||||
onInfo: createDialog(dialogsFactory.info, arguments[0])
|
||||
onWarning: createDialog(dialogsFactory.warning, arguments[0])
|
||||
onError: createDialog(dialogsFactory.error, arguments[0])
|
||||
}
|
||||
|
||||
Controls1.SplitView {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue