Editor: Don't delete on close
This commit is contained in:
@@ -267,8 +267,6 @@ public:
|
||||
|
||||
AutomationEditor* m_editor;
|
||||
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
signals:
|
||||
void currentPatternChanged();
|
||||
|
||||
|
||||
@@ -690,6 +690,7 @@ void AutomationPattern::openInAutomationEditor()
|
||||
{
|
||||
Engine::automationEditor()->setCurrentPattern( this );
|
||||
Engine::automationEditor()->parentWidget()->show();
|
||||
Engine::automationEditor()->show();
|
||||
Engine::automationEditor()->setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -2290,9 +2290,7 @@ AutomationEditorWindow::AutomationEditorWindow() :
|
||||
// Add us to workspace
|
||||
if( Engine::mainWindow()->workspace() )
|
||||
{
|
||||
Engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
parentWidget()->move( 5, 5 );
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
@@ -2343,20 +2341,6 @@ int AutomationEditorWindow::quantization() const
|
||||
return m_editor->quantization();
|
||||
}
|
||||
|
||||
void AutomationEditorWindow::closeEvent(QCloseEvent* _ce)
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
void AutomationEditorWindow::play()
|
||||
{
|
||||
m_editor->play();
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
|
||||
#include "Editor.h"
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "embed.h"
|
||||
|
||||
#include <QMdiArea>
|
||||
#include <QAction>
|
||||
#include <QToolBar>
|
||||
|
||||
@@ -96,6 +98,11 @@ Editor::Editor(bool record) :
|
||||
connect(m_recordAccompanyButton, SIGNAL(clicked()), this, SLOT(recordAccompany()));
|
||||
}
|
||||
connect(m_stopButton, SIGNAL(clicked()), this, SLOT(stop()));
|
||||
|
||||
|
||||
// Add editor to main window
|
||||
Engine::mainWindow()->workspace()->addSubWindow(this);
|
||||
parentWidget()->setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
}
|
||||
|
||||
Editor::~Editor()
|
||||
|
||||
@@ -688,8 +688,6 @@ SongEditorWindow::SongEditorWindow(Song* song) :
|
||||
m_toolBar->addWidget( zoom_lbl );
|
||||
m_toolBar->addWidget( m_zoomingComboBox );
|
||||
|
||||
Engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false );
|
||||
parentWidget()->resize( 600, 300 );
|
||||
parentWidget()->move( 5, 5 );
|
||||
parentWidget()->show();
|
||||
|
||||
Reference in New Issue
Block a user