Dialog briefly shown when clicking in the fog of war

Bug #859081 reported by Hans Joachim Desserud on 2011-09-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Steps to reproduce:
1. Start a new game.
2. Click somewhere in the visible area.
3. A dialog will pop up and the cursor will be moved to the center of the screen. Close this again.
4. (If necessary scroll over to some section of the map where you can see the black fog of war). Click on the fog of war.

Expected result:
Nothing happens, since the area is unknown.

Actual result:
The dialog is briefly shown as when clicking on a visible piece of land. Then, the game seem to remember this is fog of war and no dialog should be shown, so it is closed. For a player it will look like the dialog flickered and the cursor have been moved to the center of the screen.

In build16, nothing happens when clicking on the fog of war so something has obviously changed since then. I prefer this behaviour, since a player cannot do anything with the fog of war, so displaying the dialog makes no sense. (The lack of feedback is a better form of feedback here :p )

Just to rule it out, I tried with both sdl and opengl rendering and they have the same behaviour.

Widelands bzr r5991 on Ubuntu 11.04.

Tags: ui Edit Tag help
Shevonar (shevonar) wrote :

Did you build in debug mode? I can confirm the bug for debug mode in build16 and in rev5996. However, in release mode it is nether in build16 nor in rev5996. I'm on Win7 64bit, so might be different on Ubuntu, but I don't think so.
I'd suggest "Won't fix" if I'm correct with my guess.

Hans Joachim Desserud (hjd) wrote :

>Did you build in debug mode?
Yes, this happens in debug mode. I tried building release mode, and as you said, it has expected behaviour.

I would still consider it a bug though, or at least strange since the two modes have different behaviour for some reason. Is there any reason why debug builds does not do the same?

tags: removed: regression
Shevonar (shevonar) wrote :

Sorry didn't look here for a while...
All I can say is that the different behaviour is or was intended at some time, because the vision check is only performed in release mode. So in debug mode the window is opened and immediately closed (haven't checked why). All I have to do is remove two lines, but I'm not sure for what reason the vision check is disabled in debug mode. I think a more experienced developer should comment that.

Changed in widelands:
status: New → Confirmed
Shevonar (shevonar) wrote :

In debug mode the vision check is performed in think() and the window is killed if the node is invisible. Therefore I think ether this should also be disabled in debug mode or release mode only check (before window creation) should also be enabled in debug mode. Which solution is the better one?

SirVer (sirver) wrote :

I think that it was enabled in debug mode was because of the "DBG" button that should show some information. I never used the buttons information for anything and I doubt anyone else does, therefore I am all for disabling the window also in debug builds. If somene is against this, speak up now.

Shevonar (shevonar) wrote :

The fieldaction dialog now behaves in debug builds the same as in release builds.
Fixed in rev6056.

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build17-rc1
Angelo Locritani (alocritani) wrote :

with recent revisions (>6240) this problem seems to be still there.

clicking on a field covered by fog of war, quickly shows the action window.

Hans Joachim Desserud (hjd) wrote :

Confirmed back in 6256, so I'm reopening. Thanks for noticing, Angelo.

Changed in widelands:
status: Fix Committed → Confirmed
Shevonar (shevonar) wrote :

How this bug is fixed properly depends on the discussion on bug 939474.

Shevonar (shevonar) wrote :

Fixed in revision 6277.

Changed in widelands:
status: Confirmed → Fix Committed
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers