[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-treev-crs

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 10月 8日 (月) 10:46:36 JST


-------------------------
REMOTE_ADDR = 184.145.82.7
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-crs
-------------------------
@@ -231,8 +231,7 @@
  def fix_parents_total(iter)
    parent = iter.parent
    tmp_iter = parent.first_child
-   total = 0
-   total = tmp_iter[GItm::QTY_INDEX] if tmp_iter[GItm::BUY_INDEX]
+   total = tmp_iter[GItm::BUY_INDEX] ? tmp_iter[GItm::QTY_INDEX] : 0
    (total += tmp_iter[GItm::QTY_INDEX] if tmp_iter[GItm::BUY_INDEX]) while tmp_iter.next!
    parent[GItm::QTY_INDEX] = total
  end
@@ -332,8 +331,6 @@
  def fix_parents_total(iter)
    parent = iter.parent
    tmp_iter = parent.first_child
-   total = 0
-   total = tmp_iter[GItm::QTY_INDEX] if tmp_iter[GItm::BUY_INDEX]
+   total = tmp_iter[GItm::BUY_INDEX] ? tmp_iter[GItm::QTY_INDEX] : 0
    (total += tmp_iter[GItm::QTY_INDEX] if tmp_iter[GItm::BUY_INDEX]) while tmp_iter.next!
    parent[GItm::QTY_INDEX] = total
  end




ruby-gnome2-cvs メーリングリストの案内
Back to archive index