Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-09-25 13:01:26 +0000
committerStijn Buys <ingar@osirion.org>2010-09-25 13:01:26 +0000
commitaeef4449ce3c1bdc531fb90699fef68bd48ca644 (patch)
tree969c2ec24f382a6a75e01b1b3315dd9fe8f26d46 /src/client/buymenu.cc
parent158706fac974527436a3167cfa94a7ea82070d41 (diff)
trading bugfixes: corrects client side screen update issues
Diffstat (limited to 'src/client/buymenu.cc')
-rw-r--r--src/client/buymenu.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client/buymenu.cc b/src/client/buymenu.cc
index ba93f42..b42dc00 100644
--- a/src/client/buymenu.cc
+++ b/src/client/buymenu.cc
@@ -65,6 +65,8 @@ void BuyMenu::set_item(core::Info *info)
menu_infotext.clear();
menu_namelabel->set_text(0);
menu_modelview->set_modelname(0);
+ menu_buybutton->hide();
+ menu_modelview->hide();
// if the information timestamp is 0, the info is available
menu_inforecord = info;
@@ -78,22 +80,19 @@ void BuyMenu::set_item(core::Info *info)
} else {
for (core::Info::Text::const_iterator it = menu_inforecord->text().begin(); it != menu_inforecord->text().end(); it++) {
menu_infotext.push_back((*it));
- }
-
- menu_infotimestamp = menu_inforecord->timestamp();
- if (menu_inforecord->type() && !menu_inforecord->timestamp()) {
+ }
+ if (menu_inforecord->type()) {
menu_namelabel->set_text(menu_inforecord->name());
menu_modelview->set_modelname(menu_inforecord->modelname());
- menu_buybutton->set_command("remote buy " + menu_inforecord->type()->label() + ' ' + menu_inforecord->label() + "; view hide");
- menu_buybutton->set_label("buy " + menu_inforecord->name());
+ if (menu_inforecord->label().size()) {
+ menu_buybutton->set_command("remote buy " + menu_inforecord->type()->label() + ' ' + menu_inforecord->label() + "; view hide");
+ menu_buybutton->set_label("buy " + menu_inforecord->type()->label() + ' ' + menu_inforecord->label());
- menu_buybutton->show();
- menu_modelview->show();
- } else {
- menu_buybutton->hide();
- menu_modelview->hide();
- }
+ menu_buybutton->show();
+ menu_modelview->show();
+ }
+ }
menu_infotimestamp = menu_inforecord->timestamp();
}
}