From: PatR Date: Sun, 19 Dec 2021 11:46:21 +0000 (-0800) Subject: Qt paper doll fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f41ab7bfef389ed3896ec1fe20a612e47a5647f;p=nethack Qt paper doll fix This fixes the broken paper doll display. Changes for new glyphs added code to an 'if' but not to the corresponding 'else'. Showing map column 0 as something other than blank is still a problem. The splash window shows a red dragon and says "loading". I'm pretty sure that that used to be a crisp image but it is now a fuzzy one. It doesn't use glyphs or their tiles so shouldn't have been affected by changes to them. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index d8312ebd3..7557dd1ff 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -947,6 +947,8 @@ Qt: at Xp levels above 20 with 'showexp' On, the combined status field "Level:NN/nnnnnnnn" was too big and truncated by a char at each end Qt: searching a text window for something that wasn't found and then searching for some other target could crash +Qt: changes in glyph handling in the core introduced a bug in the "paper doll" + display for inventory subset tty: redraw unexplored locations as S_unexplored rather than after map has been partially overwritten by popup menu or text display tty: previous change resulted in remnants of previous level being shown on diff --git a/win/Qt/qt_inv.cpp b/win/Qt/qt_inv.cpp index 0a0022faa..ca9eda461 100644 --- a/win/Qt/qt_inv.cpp +++ b/win/Qt/qt_inv.cpp @@ -113,8 +113,6 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj, tips[x][y] = dupstr(tipstr); #endif glyph = obj_to_glyph(nhobj, rn2_on_display_rng); - map_glyphinfo(0, 0, glyph, 0, &gi); /* this skirts the defined - interface unfortunately */ } else { border = NO_BORDER; #ifdef ENHANCED_PAPERDOLL @@ -136,7 +134,10 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj, // an empty slot is shown as floor tile unless it's always empty glyph = canbe ? cmap_to_glyph(S_room) : GLYPH_UNEXPLORED; } - qt_settings->glyphs().drawBorderedCell(painter, glyph, gi.gm.tileidx, x, y, border, rev); + map_glyphinfo(0, 0, glyph, 0, &gi); /* this skirts the defined + * interface unfortunately */ + qt_settings->glyphs().drawBorderedCell(painter, glyph, gi.gm.tileidx, + x, y, border, rev); } // called to update the paper doll inventory subset