Kaynağa Gözat

崩溃的问题

张洋 3 yıl önce
ebeveyn
işleme
653a95bead
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      zhipuzi_pos_windows/page/CZhengcanPageUI.cpp

+ 5 - 0
zhipuzi_pos_windows/page/CZhengcanPageUI.cpp

@@ -211,6 +211,11 @@ void CZhengcanPageUI::UpdateTabletypePos()
 	//根据宽度计算每行显示的数量
 	int nMeihangNum = (nWidth - 20) / 135;
 
+	if (nMeihangNum < 1)
+	{
+		nMeihangNum = 1;
+	}
+
 	int num = 0;
 
 	CHorizontalLayoutUI* pFenleiLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuozi_type_layout")));