Skip to content

Commit

Permalink
BugFix: ensure TMap members controlling 2D player room mark are initi…
Browse files Browse the repository at this point in the history
…alised

Forgot this when I was producting Mudlet#2621 as I tend to use the other form of
the map in a floating/dockable window.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
  • Loading branch information
SlySven committed Dec 4, 2019
1 parent 4ffa087 commit 68731e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/TConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2256,6 +2256,13 @@ TLabel* TConsole::createLabel(const QString& name, int x, int y, int width, int
void TConsole::createMapper(int x, int y, int width, int height)
{
if (!mpMapper) {
// Arrange for TMap member values to be copied from the Host masters so they
// are in place when the 2D mapper is created:
mpHost->getPlayerRoomStyleDetails(mpHost->mpMap->mPlayerRoomStyle,
mpHost->mpMap->mPlayerRoomOuterDiameterPercentage,
mpHost->mpMap->mPlayerRoomInnerDiameterPercentage,
mpHost->mpMap->mPlayerRoomOuterColor,
mpHost->mpMap->mPlayerRoomInnerColor);
mpMapper = new dlgMapper(mpMainFrame, mpHost, mpHost->mpMap.data());
#if defined(INCLUDE_3DMAPPER)
mpHost->mpMap->mpM = mpMapper->glWidget;
Expand Down

0 comments on commit 68731e1

Please sign in to comment.