From 94530c7cbe5031fa9e512a0f9ae41dac41821559 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 14 Sep 2009 20:23:08 +0000 Subject: Jump from the memorisation display back to spells if you cannot memorise any further spells. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10677 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tilereg.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/tilereg.cc') diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 85711f10c4..3c8136bc11 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -1864,7 +1864,8 @@ int InventoryRegion::handle_spells_mouse(MouseEvent &event, int item_idx) tiles.set_need_redraw(); if (!learn_spell(spell, m_items[item_idx].special)) flush_input_buffer( FLUSH_ON_FAILURE ); - else if (!can_learn_spell(true) || !has_spells_to_memorise()) + else if (!can_learn_spell(true) + || !has_spells_to_memorise(true, spell)) { // Jump back to spells list. (Really, this should only happen // if there aren't any other spells to memorise, but this @@ -2056,7 +2057,7 @@ bool InventoryRegion::update_tip_text(std::string& tip) bool display_actions = (m_items[item_idx].key == 0 && mouse_control::current_mode() == MOUSE_MODE_COMMAND); - if (display_actions && Options.tile_display != TDSP_INVENT) + if (Options.tile_display != TDSP_INVENT) { if (m_items[item_idx].idx == NUM_SPELLS) { -- cgit v1.2.3-54-g00ecf