소스 검색

崩溃的问题

张洋 3 년 전
부모
커밋
653a95bead
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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")));