summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-11 02:55:31 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-11 02:55:31 +0300
commit7f905e347c1312b4e64e466f845dc5edb5fc4867 (patch)
tree41563de9555a4ce2bddd39a548d371837da49f5f /src/gui/skilldialog.cpp
parent501f9934731114562c3659918d9d7b39625eb7b5 (diff)
downloadplus-7f905e347c1312b4e64e466f845dc5edb5fc4867.tar.gz
plus-7f905e347c1312b4e64e466f845dc5edb5fc4867.tar.bz2
plus-7f905e347c1312b4e64e466f845dc5edb5fc4867.tar.xz
plus-7f905e347c1312b4e64e466f845dc5edb5fc4867.zip
Fix use button in skills dialog if switching tabs.
Add drawing skill image in shortcuts bar.
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index a930d3929..6008e97b0 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -216,6 +216,12 @@ public:
return nullptr;
}
+ void setCurrent()
+ {
+ if (skillDialog)
+ skillDialog->updateTabSelection();
+ }
+
private:
SkillListBox *mListBox;
};
@@ -656,3 +662,15 @@ void SkillDialog::useItem(int itemId)
}
}
}
+
+void SkillDialog::updateTabSelection()
+{
+ SkillTab *tab = static_cast<SkillTab*>(mTabs->getSelectedTab());
+ if (tab)
+ {
+ if (SkillInfo *info = tab->getSelectedInfo())
+ mUseButton->setEnabled(info->range > 0);
+ else
+ mUseButton->setEnabled(false);
+ }
+}