Commit 3b9d59a3 authored by Victor Yacovlev's avatar Victor Yacovlev

Notify actors on GUI really ready (after some delay)

parent 77483238
......@@ -31,7 +31,8 @@ MainWindow::MainWindow(Plugin * p) :
prevBottomSize_(DefaultConsoleHeight),
menubarContextMenu_(0),
afterShowTimerId2_(0),
afterShowTimerId3_(0)
afterShowTimerId3_(0),
afterShowTimerId4_(0)
{
debuggerWindow_ = 0;
......@@ -786,6 +787,15 @@ void MainWindow::setFocusOnCentralWidget()
twe->component->setFocus();
}
static void notifyAllActorsGuiReady()
{
QList<Shared::ActorInterface*> actors =
PluginManager::instance()->findPlugins<Shared::ActorInterface>();
Q_FOREACH(Shared::ActorInterface* actor, actors) {
actor->notifyGuiReady();
}
}
void MainWindow::timerEvent(QTimerEvent *e)
{
e->accept();
......@@ -798,6 +808,11 @@ void MainWindow::timerEvent(QTimerEvent *e)
killTimer(afterShowTimerId3_);
afterShowTimerId3_ = 0;
setFirstTimeWindowLayout_stage3();
afterShowTimerId4_ = startTimer(100);
}
if (afterShowTimerId4_ == e->timerId()) {
killTimer(afterShowTimerId4_);
notifyAllActorsGuiReady();
}
if (isPresentationMode() && _presentationModeContext.clockTimerId==e->timerId()) {
const QTime dt = QDateTime::currentDateTime().time();
......@@ -1727,6 +1742,8 @@ void MainWindow::loadSettings(const QStringList & keys)
// ui->actionShow_Console_Pane->setChecked(sizes[1] > 0);
ui->actionShow_Console_Pane->setChecked(showConsole);
}
// notify GUI ready
afterShowTimerId4_ = startTimer(300);
}
menubarContextMenu_->loadSettings();
}
......
......@@ -224,6 +224,7 @@ private:
int afterShowTimerId2_;
int afterShowTimerId3_;
int afterShowTimerId4_;
struct PresentationModeContext {
bool enabled;
......
......@@ -136,6 +136,8 @@ public /*methods*/:
Q_UNUSED(receiver); Q_UNUSED(method);
}
inline virtual void notifyGuiReady() { }
/* === Actor utilities === */
/** Converts custom-type scalar value to string representation */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment