1
0
Fork 0

Error reporting UI tweaks

This commit is contained in:
James Turner 2021-04-30 13:44:00 +01:00
parent 3497d531fc
commit dd9507a6ef
3 changed files with 26 additions and 6 deletions

View file

@ -18,7 +18,9 @@ var ErrorNotification =
m._hideTimer = maketimer(m.SHOW_TIME, m, ErrorNotification._hideTimeout);
m._hideTimer.singleShot = 1;
return m;
m._reportIndex = 0;
return m;
},
# Destructor
@ -86,7 +88,7 @@ var ErrorNotification =
clicked: func()
{
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()
@ -131,8 +133,9 @@ var ErrorNotification =
me.setInt("y", y);
},
show: func()
show: func(index)
{
me._reportIndex = index;
me._hideTimer.stop();
me.setBool("visible", 1);
me._hideTimer.start();
@ -152,7 +155,7 @@ var ErrorNotification =
var errorNotificationCanvas = nil;
var showErrorNotification = func()
var showErrorNotification = func(node)
{
if (errorNotificationCanvas == nil) {
# create instance
@ -161,7 +164,8 @@ var showErrorNotification = func()
}
errorNotificationCanvas.updateText();
errorNotificationCanvas.show();
var reportIndex = node.getNode("index").getValue();
errorNotificationCanvas.show(reportIndex);
}
addcommand("show-error-notification-popup", showErrorNotification);

View file

@ -974,8 +974,9 @@ Started September 2000 by David Megginson, david@megginson.com
</mp-carriers>
<freeze-mouse-flight-controls-on-pause type="bool" userarchive="n">true</freeze-mouse-flight-controls-on-pause>
<error-report userarchive="y">
<enabled type="bool">false</enabled>
<enabled type="bool">true</enabled>
<mp-report-enabled type="bool">true</mp-report-enabled>
<enable-in-developer-mode type="bool">false</enable-in-developer-mode>
</error-report>
</sim>
<!-- accelerations -->

View file

@ -86,6 +86,21 @@
<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>
<legend>Next error</legend>
<binding>