Error reporting UI tweaks
This commit is contained in:
parent
3497d531fc
commit
dd9507a6ef
3 changed files with 26 additions and 6 deletions
|
@ -18,7 +18,9 @@ var ErrorNotification =
|
||||||
|
|
||||||
m._hideTimer = maketimer(m.SHOW_TIME, m, ErrorNotification._hideTimeout);
|
m._hideTimer = maketimer(m.SHOW_TIME, m, ErrorNotification._hideTimeout);
|
||||||
m._hideTimer.singleShot = 1;
|
m._hideTimer.singleShot = 1;
|
||||||
return m;
|
m._reportIndex = 0;
|
||||||
|
|
||||||
|
return m;
|
||||||
},
|
},
|
||||||
|
|
||||||
# Destructor
|
# Destructor
|
||||||
|
@ -86,7 +88,7 @@ var ErrorNotification =
|
||||||
clicked: func()
|
clicked: func()
|
||||||
{
|
{
|
||||||
me.hideNow();
|
me.hideNow();
|
||||||
fgcommand("show-error-report"); # should we show the current one?
|
fgcommand("show-error-report", props.Node.new({ "index": me._reportIndex})); # should we show the current one?
|
||||||
},
|
},
|
||||||
|
|
||||||
updateText: func()
|
updateText: func()
|
||||||
|
@ -131,8 +133,9 @@ var ErrorNotification =
|
||||||
me.setInt("y", y);
|
me.setInt("y", y);
|
||||||
},
|
},
|
||||||
|
|
||||||
show: func()
|
show: func(index)
|
||||||
{
|
{
|
||||||
|
me._reportIndex = index;
|
||||||
me._hideTimer.stop();
|
me._hideTimer.stop();
|
||||||
me.setBool("visible", 1);
|
me.setBool("visible", 1);
|
||||||
me._hideTimer.start();
|
me._hideTimer.start();
|
||||||
|
@ -152,7 +155,7 @@ var ErrorNotification =
|
||||||
|
|
||||||
var errorNotificationCanvas = nil;
|
var errorNotificationCanvas = nil;
|
||||||
|
|
||||||
var showErrorNotification = func()
|
var showErrorNotification = func(node)
|
||||||
{
|
{
|
||||||
if (errorNotificationCanvas == nil) {
|
if (errorNotificationCanvas == nil) {
|
||||||
# create instance
|
# create instance
|
||||||
|
@ -161,7 +164,8 @@ var showErrorNotification = func()
|
||||||
}
|
}
|
||||||
|
|
||||||
errorNotificationCanvas.updateText();
|
errorNotificationCanvas.updateText();
|
||||||
errorNotificationCanvas.show();
|
var reportIndex = node.getNode("index").getValue();
|
||||||
|
errorNotificationCanvas.show(reportIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
addcommand("show-error-notification-popup", showErrorNotification);
|
addcommand("show-error-notification-popup", showErrorNotification);
|
||||||
|
|
|
@ -974,8 +974,9 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
</mp-carriers>
|
</mp-carriers>
|
||||||
<freeze-mouse-flight-controls-on-pause type="bool" userarchive="n">true</freeze-mouse-flight-controls-on-pause>
|
<freeze-mouse-flight-controls-on-pause type="bool" userarchive="n">true</freeze-mouse-flight-controls-on-pause>
|
||||||
<error-report userarchive="y">
|
<error-report userarchive="y">
|
||||||
<enabled type="bool">false</enabled>
|
<enabled type="bool">true</enabled>
|
||||||
<mp-report-enabled type="bool">true</mp-report-enabled>
|
<mp-report-enabled type="bool">true</mp-report-enabled>
|
||||||
|
<enable-in-developer-mode type="bool">false</enable-in-developer-mode>
|
||||||
</error-report>
|
</error-report>
|
||||||
</sim>
|
</sim>
|
||||||
<!-- accelerations -->
|
<!-- accelerations -->
|
||||||
|
|
|
@ -86,6 +86,21 @@
|
||||||
|
|
||||||
<empty><stretch>1</stretch></empty>
|
<empty><stretch>1</stretch></empty>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<legend>Previous error</legend>
|
||||||
|
<binding>
|
||||||
|
<command>show-error-report</command>
|
||||||
|
<previous type="bool">true</previous>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-update</command>
|
||||||
|
</binding>
|
||||||
|
|
||||||
|
<visible>
|
||||||
|
<property>/sim/error-report/display/have-previous</property>
|
||||||
|
</visible>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>Next error</legend>
|
<legend>Next error</legend>
|
||||||
<binding>
|
<binding>
|
||||||
|
|
Loading…
Add table
Reference in a new issue