changeset 455:1ab4ac6b2fcb

Merge
author Chris Cannam
date Thu, 21 May 2015 15:32:18 +0100
parents 3e2a2ca24d90 (current diff) 549f77216048 (diff)
children 8125b8cb8128
files
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
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);
--- a/framework/MainWindowBase.h	Thu May 21 15:31:12 2015 +0100
+++ b/framework/MainWindowBase.h	Thu May 21 15:32:18 2015 +0100
@@ -159,6 +159,7 @@
     void canSave(bool);
     void canSaveAs(bool);
     void hideSplash();
+    void hideSplash(QWidget *);
     void sessionLoaded();
     void audioFileLoaded();
     void replacedDocument();
@@ -288,6 +289,8 @@
 
     virtual void closeSession() = 0;
 
+    virtual void emitHideSplash();
+
     virtual void newerVersionAvailable(QString) { }
 
     virtual void menuActionMapperInvoked(QObject *);