Author: sveinung
Date: Wed Oct 28 10:45:13 2015
New Revision: 30277

URL: http://svn.gna.org/viewcvs/freeciv?rev=30277&view=rev
Log:
GTK clients: respect holes in tech tgt selector

Reported by Marko Lindqvist <cazfi>

See bug #23947

Modified:
    branches/S2_6/client/gui-gtk-2.0/action_dialog.c
    branches/S2_6/client/gui-gtk-3.0/action_dialog.c

Modified: branches/S2_6/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/action_dialog.c?rev=30277&r1=30276&r2=30277&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-2.0/action_dialog.c    (original)
+++ branches/S2_6/client/gui-gtk-2.0/action_dialog.c    Wed Oct 28 10:45:13 2015
@@ -511,10 +511,10 @@
     GValue value = { 0, };
 
     advance_index_iterate(A_FIRST, i) {
-      if (research_invention_state(vresearch, i) == TECH_KNOWN
-          && (research_invention_state(presearch, i) == TECH_UNKNOWN
-              || research_invention_state(presearch, i)
-                 == TECH_PREREQS_KNOWN)) {
+      if (research_invention_gettable(presearch, i,
+                                      game.info.tech_steal_allow_holes)
+          && research_invention_state(vresearch, i) == TECH_KNOWN
+          && research_invention_state(presearch, i) != TECH_KNOWN) {
        gtk_list_store_append(store, &it);
 
        g_value_init(&value, G_TYPE_STRING);

Modified: branches/S2_6/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/action_dialog.c?rev=30277&r1=30276&r2=30277&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/action_dialog.c    (original)
+++ branches/S2_6/client/gui-gtk-3.0/action_dialog.c    Wed Oct 28 10:45:13 2015
@@ -516,10 +516,10 @@
     GValue value = { 0, };
 
     advance_index_iterate(A_FIRST, i) {
-      if (research_invention_state(vresearch, i) == TECH_KNOWN
-          && (research_invention_state(presearch, i) == TECH_UNKNOWN
-              || research_invention_state(presearch, i)
-                 == TECH_PREREQS_KNOWN)) {
+      if (research_invention_gettable(presearch, i,
+                                      game.info.tech_steal_allow_holes)
+          && research_invention_state(vresearch, i) == TECH_KNOWN
+          && research_invention_state(presearch, i) != TECH_KNOWN) {
        gtk_list_store_append(store, &it);
 
        g_value_init(&value, G_TYPE_STRING);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to