mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:48:44 +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;
|
return userAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::toggleTabletUI() const {
|
void Application::toggleTabletUI(bool shouldOpen) const {
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
|
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
|
||||||
bool messageOpen = tablet->isMessageDialogOpen();
|
bool messageOpen = tablet->isMessageDialogOpen();
|
||||||
if (!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) {
|
if ((!messageOpen || (messageOpen && !hmd->getShouldShowTablet())) && !(shouldOpen && hmd->getShouldShowTablet())) {
|
||||||
auto HMD = DependencyManager::get<HMDScriptingInterface>();
|
auto HMD = DependencyManager::get<HMDScriptingInterface>();
|
||||||
HMD->toggleShouldShowTablet();
|
HMD->toggleShouldShowTablet();
|
||||||
}
|
}
|
||||||
|
@ -5771,6 +5771,9 @@ void Application::showDialog(const QUrl& widgetUrl, const QUrl& tabletUrl, const
|
||||||
|
|
||||||
if (!tablet->getToolbarMode()) {
|
if (!tablet->getToolbarMode()) {
|
||||||
onTablet = tablet->pushOntoStack(tabletUrl);
|
onTablet = tablet->pushOntoStack(tabletUrl);
|
||||||
|
if (onTablet) {
|
||||||
|
toggleTabletUI(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!onTablet) {
|
if (!onTablet) {
|
||||||
|
|
|
@ -504,7 +504,7 @@ private:
|
||||||
static void dragEnterEvent(QDragEnterEvent* event);
|
static void dragEnterEvent(QDragEnterEvent* event);
|
||||||
|
|
||||||
void maybeToggleMenuVisible(QMouseEvent* event) const;
|
void maybeToggleMenuVisible(QMouseEvent* event) const;
|
||||||
void toggleTabletUI() const;
|
void toggleTabletUI(bool shouldOpen = false) const;
|
||||||
|
|
||||||
MainWindow* _window;
|
MainWindow* _window;
|
||||||
QElapsedTimer& _sessionRunTimer;
|
QElapsedTimer& _sessionRunTimer;
|
||||||
|
|
Loading…
Reference in a new issue