← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-keyboard-after-save-delete into lp:widelands

 

Review: Approve review, compile, short testplay

Was able to reproduce this on trunk.

Some comements inline.

I will play this however, perhaps in my youtube channel :-).
kaputtnick can you put a brakpoint at this line to check 
on what condition it is called? 

I can do, so but perhpas next weekend only.

Diff comments:

> === modified file 'src/ui_basic/panel.cc'
> --- src/ui_basic/panel.cc	2018-05-07 05:35:32 +0000
> +++ src/ui_basic/panel.cc	2018-05-13 08:07:57 +0000
> @@ -664,8 +664,6 @@
>  	if (!parent_ || this == modal_) {
>  		return;
>  	}
> -	if (parent_->focus_ == this)
> -		return;

This ins in void Panel::focus(const bool topcaller)

Not sure is this may have unexpected side effects. 
E.g. endless recursion in case Windows appear twice in hierarchy?

>  
>  	parent_->focus_ = this;
>  	parent_->focus(false);
> 
> === modified file 'src/wui/load_or_save_game.cc'
> --- src/wui/load_or_save_game.cc	2018-05-13 07:15:39 +0000
> +++ src/wui/load_or_save_game.cc	2018-05-13 08:07:57 +0000
> @@ -268,6 +268,7 @@
>  		   ngettext("Confirm Deleting File", "Confirm Deleting Files", no_selections), message,
>  		   UI::WLMessageBox::MBoxType::kOkCancel);
>  		do_delete = confirmationBox.run<UI::Panel::Returncodes>() == UI::Panel::Returncodes::kOk;
> +		table_.focus();

So this fix alone, does not do it without the other one? Thats odd.

>  	}
>  	if (do_delete) {
>  		for (const uint32_t index : selections) {


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-keyboard-after-save-delete/+merge/345469
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-keyboard-after-save-delete.


References