Skip to content

Commit

Permalink
Fix alertmaneuer soft buttons (#342)
Browse files Browse the repository at this point in the history
* Fix AlertManeuer soft buttons removal

Looks like there was an old HMI code which
was recently uncommented, however it is not
working as expected.
Child objects which were dynamically created were
not removed properly. Removal function has been
updated to make removal of child objects as it
should be.

* fixup! Fix AlertManeuer soft buttons removal
  • Loading branch information
AKalinich-Luxoft authored Apr 24, 2020
1 parent cd290da commit 7a7e6ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/view/sdl/AlertManeuverPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ SDL.AlertManeuverPopUp = Em.ContainerView.create(
* @param {Object} params
*/
addSoftButtons: function(params) {
var count = this.get('softbuttons').removeAllChildren();
if (params) {
var softButtonsClass;
switch (params.length) {
Expand Down Expand Up @@ -161,7 +160,10 @@ SDL.AlertManeuverPopUp = Em.ContainerView.create(
}
},
AlertManeuverActive: function(message) {
var self = this;
this.get('softbuttons.childViews').removeObjects(
this.get('softbuttons.childViews').filterProperty('softButtonID')
);

var params = message.params;
if (params.softButtons) {
this.addSoftButtons( params.softButtons );
Expand All @@ -170,6 +172,8 @@ SDL.AlertManeuverPopUp = Em.ContainerView.create(
this.set( 'activate', true );

clearTimeout( this.timer );

var self = this;
this.timer = setTimeout( function() {
self.set( 'activate', false );
FFW.Navigation.sendNavigationResult(
Expand Down

0 comments on commit 7a7e6ac

Please sign in to comment.