Author: sveinung
Date: Wed Oct 28 10:24:49 2015
New Revision: 30264

URL: http://svn.gna.org/viewcvs/freeciv?rev=30264&view=rev
Log:
Qt client: respect holes in tech tgt selector

Reported by Marko Lindqvist <cazfi>

See bug #23982

Modified:
    trunk/client/gui-qt/dialogs.cpp

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=30264&r1=30263&r2=30264&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Wed Oct 28 10:24:49 2015
@@ -1684,10 +1684,10 @@
     const struct research *vresearch = research_get(pvictim);
 
     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) {
         func = spy_steal_something;
         str = research_advance_name_translation(presearch, i);
         cd->add_item(str, func, qv1, i);


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

Reply via email to