Author: alink
Date: Sun May 27 02:02:40 2007
New Revision: 17888
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17888&view=rev
Log:
Remove a never reached value and simplify the little misleading local code
causing it
keeping the same good behavior: you can't cancel a dialog with options and only
an OK button
Modified:
trunk/src/construct_dialog.cpp
Modified: trunk/src/construct_dialog.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/construct_dialog.cpp?rev=17888&r1=17887&r2=17888&view=diff
==============================================================================
--- trunk/src/construct_dialog.cpp (original)
+++ trunk/src/construct_dialog.cpp Sun May 27 02:02:40 2007
@@ -647,8 +647,8 @@
if(type_ == MESSAGE) {
//special return value for escaping game event messages
return (ESCAPE_DIALOG);
- } else if(type_ != OK_ONLY || !use_menu) {
- return ((type_ == OK_ONLY && use_menu) ? 1 :
CLOSE_DIALOG);
+ } else if(!(type_ == OK_ONLY && use_menu)) {
+ return (CLOSE_DIALOG);
}
}
@@ -698,7 +698,7 @@
)
) || (
new_right_button && !info.right_button &&
- (type_ != OK_ONLY || !use_menu) &&
+ !(type_ == OK_ONLY && use_menu) &&
!point_in_rect(mousex,mousey,last_dimension_.frame) &&
!point_in_rect(mousex,mousey,last_dimension_.textbox) &&
!point_in_rect(mousex,mousey,last_dimension_.message)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits