Fix tile button with negative base index

This commit is contained in:
David Capello 2020-10-30 21:14:31 -03:00
parent 505aa6119a
commit 2501f5aa3c

View File

@ -149,7 +149,8 @@ void TileButton::onPaint(PaintEvent& ev)
if (site.tileset())
baseIndex = site.tileset()->baseIndex();
std::string str = fmt::format("{}", doc::tile_geti(m_tile) + baseIndex - 1);
std::string str = fmt::format(
"{}", int(doc::tile_geti(m_tile)) + baseIndex - 1);
setTextQuiet(str.c_str());
// TODO calc a proper color for the text