mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 22:44:15 +02:00
show menu after requesting it
This commit is contained in:
parent
156b3f9738
commit
03d3666c0c
2 changed files with 6 additions and 3 deletions
|
@ -1522,12 +1522,12 @@ QString Application::getUserAgent() {
|
|||
return userAgent;
|
||||
}
|
||||
|
||||
void Application::toggleTabletUI() const {
|
||||
void Application::toggleTabletUI(bool shouldOpen) const {
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
|
||||
bool messageOpen = tablet->isMessageDialogOpen();
|
||||
if (!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) {
|
||||
if ((!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) && !(shouldOpen && hmd->getShouldShowTablet())) {
|
||||
auto HMD = DependencyManager::get<HMDScriptingInterface>();
|
||||
HMD->toggleShouldShowTablet();
|
||||
}
|
||||
|
@ -5771,6 +5771,9 @@ void Application::showDialog(const QUrl& widgetUrl, const QUrl& tabletUrl, const
|
|||
|
||||
if (!tablet->getToolbarMode()) {
|
||||
onTablet = tablet->pushOntoStack(tabletUrl);
|
||||
if (onTablet) {
|
||||
toggleTabletUI(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!onTablet) {
|
||||
|
|
|
@ -504,7 +504,7 @@ private:
|
|||
static void dragEnterEvent(QDragEnterEvent* event);
|
||||
|
||||
void maybeToggleMenuVisible(QMouseEvent* event) const;
|
||||
void toggleTabletUI() const;
|
||||
void toggleTabletUI(bool shouldOpen = false) const;
|
||||
|
||||
MainWindow* _window;
|
||||
QElapsedTimer& _sessionRunTimer;
|
||||
|
|
Loading…
Reference in a new issue