From e3f651e65f5a486f47ae81fe3ba5e68e8c48f79e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Nov 2015 21:30:14 +0300 Subject: Allow drag skill with any selected level to shortcuts window. --- src/gui/widgets/itemshortcutcontainer.cpp | 4 +++- src/gui/windows/skilldialog.cpp | 5 +++-- src/gui/windows/skilldialog.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index dc7c214dd..bfb8fef0d 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -432,8 +432,10 @@ void ItemShortcutContainer::mouseDragged(MouseEvent &event) { selShortcut->removeItem(index); dragDrop.dragSkill(skill, - DragDropSource::Shortcuts, index); + DragDropSource::Shortcuts, + index); dragDrop.setItem(itemId); + dragDrop.setItemColor(itemColor); } else { diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 9949ba859..44d02b573 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -562,7 +562,8 @@ void SkillDialog::widgetResized(const Event &event) } void SkillDialog::useItem(const int itemId, - const AutoTarget autoTarget) const + const AutoTarget autoTarget, + const int level) const { const std::map::const_iterator it = mSkills.find(itemId - SKILL_MIN_ID); @@ -571,7 +572,7 @@ void SkillDialog::useItem(const int itemId, const SkillInfo *const info = (*it).second; // +++ need add skill level here - useSkill(info, autoTarget, 0); + useSkill(info, autoTarget, level); } void SkillDialog::updateTabSelection() diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h index 1cf92b586..2e0125e9c 100644 --- a/src/gui/windows/skilldialog.h +++ b/src/gui/windows/skilldialog.h @@ -114,7 +114,8 @@ class SkillDialog final : public Window, void widgetResized(const Event &event) override final; void useItem(const int itemId, - const AutoTarget autoTarget) const; + const AutoTarget autoTarget, + const int level) const; void updateTabSelection(); -- cgit v1.2.3-70-g09d2