Fixed bug when count of favorites buttons changed.

master
Josef Rokos 8 years ago
parent 03fd0adf12
commit da3aa2987c

@ -103,6 +103,13 @@ void ShopForm::loadButtons()
Service<FavoritItem> srvFav; Service<FavoritItem> srvFav;
QMap<QString, FavoritItemPtr> btnMap; QMap<QString, FavoritItemPtr> btnMap;
foreach (QWidget *child, ui->favorites->findChildren<QWidget*>()) {
if (child->objectName() != "directSale")
{
delete child;
}
}
foreach (FavoritItemPtr item, srvFav.all()) { foreach (FavoritItemPtr item, srvFav.all()) {
btnMap[item->favButtonName()] = item; btnMap[item->favButtonName()] = item;
} }

@ -50,6 +50,12 @@
</item> </item>
<item> <item>
<widget class="QTableView" name="commodityTable"> <widget class="QTableView" name="commodityTable">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum> <enum>QAbstractItemView::SingleSelection</enum>
</property> </property>

Loading…
Cancel
Save