diff framework/MainWindowBase.cpp @ 455:1ab4ac6b2fcb

Merge
author Chris Cannam
date Thu, 21 May 2015 15:32:18 +0100
parents 549f77216048
children ea30a8c4cb93 56acd9368532
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Thu May 21 15:31:12 2015 +0100
+++ b/framework/MainWindowBase.cpp	Thu May 21 15:32:18 2015 +0100
@@ -164,6 +164,8 @@
     XSetErrorHandler(handle_x11_error);
 #endif
 
+    connect(this, SIGNAL(hideSplash()), this, SLOT(emitHideSplash()));
+    
     connect(CommandHistory::getInstance(), SIGNAL(commandExecuted()),
 	    this, SLOT(documentModified()));
     connect(CommandHistory::getInstance(), SIGNAL(documentRestored()),
@@ -259,6 +261,8 @@
     if (withMIDIInput) {
         m_midiInput = new MIDIInput(QApplication::applicationName(), this);
     }
+
+    QTimer::singleShot(1500, this, SIGNAL(hideSplash()));
 }
 
 MainWindowBase::~MainWindowBase()
@@ -275,6 +279,12 @@
 }
 
 void
+MainWindowBase::emitHideSplash()
+{
+    emit hideSplash(this);
+}
+
+void
 MainWindowBase::finaliseMenus()
 {
     delete m_menuShortcutMapper;
@@ -587,8 +597,8 @@
     emit canMeasureLayer(haveCurrentLayer);
     emit canSelect(haveMainModel && haveCurrentPane);
     emit canPlay(haveMainModel && havePlayTarget);
-    emit canFfwd(true);
-    emit canRewind(true);
+    emit canFfwd(haveMainModel);
+    emit canRewind(haveMainModel);
     emit canPaste(haveClipboardContents);
     emit canInsertInstant(haveCurrentPane);
     emit canInsertInstantsAtBoundaries(haveCurrentPane && haveSelection);