Skip to content

3d mapper creation at clicking#3451

Merged
vadi2 merged 3 commits intoMudlet:developmentfrom
Edru2:3dMapperStartAtClicking
Mar 14, 2020
Merged

3d mapper creation at clicking#3451
vadi2 merged 3 commits intoMudlet:developmentfrom
Edru2:3dMapperStartAtClicking

Conversation

@Edru2
Copy link
Copy Markdown
Member

@Edru2 Edru2 commented Mar 14, 2020

Brief overview of PR changes/additions

With this PR the 3d Mapper is only created if clicked on the 2d/3d button

Motivation for adding to Mudlet

Some people which didn't even use the 3d mapper had problems caused by it.

Other info (issues closed, discussion etc)

fixed by the way button dissapearance if clicking 2d/3d button
also changed createMapper that is no longer possible to create an embedded mapper and a dockwindow mapper at the same time (which caused crash of the Mudlet application)

Edru2 added 2 commits March 14, 2020 14:39
3dMapper only created if the button 2d/3d is clicked
It was possible to create an embedded and a dockwindow mapper at the same time. If clicked on the 2d/3d button that would create a crash.
with this change it is only possible to create an embedded mapper if there is no dockwindow mapper.
@Edru2 Edru2 requested a review from a team as a code owner March 14, 2020 14:57
@Edru2 Edru2 requested review from a team March 14, 2020 14:57
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Mar 14, 2020

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@Edru2 Edru2 changed the title 3d mapper start at clicking 3d mapper creation at clicking Mar 14, 2020
Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well in testing 👍

if (glWidget->isVisible()) {
d3buttons->setVisible(true);
} else {
// Use timer do not let the buttons dissappear
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this, what does it mean?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if everyone had this issue. But for me in 4.6.1 if i change between 2d/3d Mapper view. The mapper buttons reloaded strangely sometimes (and also disappeared).
this fixes it for me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a timer of 0 also work?

Try a comment of // workaround for buttons reloading oddly

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. A timer of 0 doesn't work.
If this timer could potentially create other issues I'll revert it because the buttons reloading strangely/disappearing is a minor issue (they reappear after clicking on the mapper or reloading the window)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be OK.

Copy link
Copy Markdown
Member

@demonnic demonnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@vadi2 vadi2 merged commit 26360e1 into Mudlet:development Mar 14, 2020
auto pW = mDockWidgetMap.value(windowname);
auto pM = mpHost->mpDockableMapWidget;
if (pM) {
return {false, "cannot create mapper. Do you already use a map window?"};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Too late for this PR - but this QString should be QStringLiteral(...) wrapped as it is a text for the Lua API and as such is NOT to be translated {if it was a GUI text then it should have a tr(...) wrapping} either way - it is not desirable to have raw C++ strings used to initialise QStrings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Edru2 Edru2 deleted the 3dMapperStartAtClicking branch September 1, 2020 06:33
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants