Esempio n. 1
0
void
Gui::ensureScriptEditorVisible()
{
    // Ensure that the script editor is visible
    TabWidget* pane = _imp->_scriptEditor->getParentPane();

    if (pane != 0) {
        pane->setCurrentWidget(_imp->_scriptEditor);
    } else {
        pane = _imp->_nodeGraphArea->getParentPane();
        if (!pane) {
            std::list<TabWidget*> tabs;
            {
                QMutexLocker k(&_imp->_panesMutex);
                tabs = _imp->_panes;
            }
            if ( tabs.empty() ) {
                return;
            }
            pane = tabs.front();
        }
        assert(pane);
        pane->moveScriptEditorHere();
    }
}
Esempio n. 2
0
void
Gui::ensureProgressPanelVisible()
{
    TabWidget* pane = _imp->_progressPanel->getParentPane();

    if (pane != 0) {
        pane->setCurrentWidget(_imp->_progressPanel);
    } else {
        pane = _imp->_nodeGraphArea->getParentPane();
        if (!pane) {
            std::list<TabWidget*> tabs;
            {
                QMutexLocker k(&_imp->_panesMutex);
                tabs = _imp->_panes;
            }
            if ( tabs.empty() ) {
                return;
            }
            pane = tabs.front();
        }
        assert(pane);
        pane->moveProgressPanelHere();
    }
}