Deleted the stopTimerEvent method.
This commit is contained in:
parent
dc3fa3fe6b
commit
2667bf360f
|
@ -54,7 +54,6 @@ CGLView::CGLView(QtWindow* parent, CSettings* settings)
|
|||
m_forcefullRedraw = 0;
|
||||
m_forceRatingRedraw = 0;
|
||||
m_forceBarRedraw = 0;
|
||||
m_allowedTimerEvent = true;
|
||||
|
||||
m_backgroundColor = QColor(0, 0, 0);
|
||||
|
||||
|
@ -72,7 +71,6 @@ CGLView::~CGLView()
|
|||
delete m_song;
|
||||
delete m_score;
|
||||
m_titleHeight = 0;
|
||||
|
||||
}
|
||||
|
||||
QSize CGLView::minimumSizeHint() const
|
||||
|
@ -85,16 +83,6 @@ QSize CGLView::sizeHint() const
|
|||
return QSize(200, 800); //fixme this does not work
|
||||
}
|
||||
|
||||
void CGLView::stopTimerEvent()
|
||||
{
|
||||
m_allowedTimerEvent=false;
|
||||
}
|
||||
|
||||
void CGLView::startTimerEvent()
|
||||
{
|
||||
m_allowedTimerEvent=true;
|
||||
}
|
||||
|
||||
void CGLView::paintGL()
|
||||
{
|
||||
BENCHMARK(2, "enter");
|
||||
|
@ -381,8 +369,6 @@ void CGLView::updateMidiTask()
|
|||
|
||||
void CGLView::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
if (!m_allowedTimerEvent) return;
|
||||
|
||||
BENCHMARK(0, "timer enter");
|
||||
if (event->timerId() != m_timer.timerId())
|
||||
{
|
||||
|
|
|
@ -51,9 +51,6 @@ public:
|
|||
CScore* getScoreObject() {return m_score;}
|
||||
int m_cfg_openGlOptimise;
|
||||
|
||||
void stopTimerEvent();
|
||||
void startTimerEvent();
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *event);
|
||||
void mediaTimerEvent(int ticks);
|
||||
|
@ -92,7 +89,7 @@ private:
|
|||
int m_forceBarRedraw;
|
||||
int m_titleHeight;
|
||||
eventBits_t m_eventBits;
|
||||
bool m_allowedTimerEvent;
|
||||
|
||||
};
|
||||
|
||||
#endif // __GLVIEW_H__
|
||||
|
|
|
@ -238,13 +238,20 @@ void GuiTopBar::on_startBarSpin_valueChanged(double bar)
|
|||
{
|
||||
if (!m_song) return;
|
||||
|
||||
// Stop the muisc playing
|
||||
m_song->playMusic(false);
|
||||
setPlayButtonState(false);
|
||||
stopMuiscPlaying();
|
||||
|
||||
m_song->setPlayFromBar( bar);
|
||||
}
|
||||
|
||||
// Stop the muisc playing
|
||||
void GuiTopBar::stopMuiscPlaying()
|
||||
{
|
||||
if (!m_song) return;
|
||||
|
||||
m_song->playMusic(false);
|
||||
setPlayButtonState(false);
|
||||
}
|
||||
|
||||
void GuiTopBar::on_saveBarButton_clicked(bool clicked)
|
||||
{
|
||||
if (!m_song) return;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
void setSpeed(int value){ speedSpin->setValue(value); }
|
||||
int getSpeed(){return speedSpin->value();}
|
||||
|
||||
void stopMuiscPlaying();
|
||||
void updateTranslate();
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -454,22 +454,12 @@ void QtWindow::openRecentFile()
|
|||
}
|
||||
|
||||
void QtWindow::showMidiSetup(){
|
||||
bool isPlaying=false;
|
||||
|
||||
if(m_song->playingMusic()){
|
||||
isPlaying=true;
|
||||
m_topBar->on_playButton_clicked(true);
|
||||
}
|
||||
m_topBar->stopMuiscPlaying();
|
||||
|
||||
m_glWidget->stopTimerEvent();
|
||||
GuiMidiSetupDialog midiSetupDialog(this);
|
||||
midiSetupDialog.init(m_song, m_settings);
|
||||
midiSetupDialog.exec();
|
||||
|
||||
m_glWidget->startTimerEvent();
|
||||
if (isPlaying){
|
||||
m_topBar->on_playButton_clicked(true);
|
||||
}
|
||||
}
|
||||
|
||||
// load the recent file list from the config file into the file menu
|
||||
|
@ -643,8 +633,6 @@ void QtWindow::keyboardShortcuts()
|
|||
|
||||
void QtWindow::open()
|
||||
{
|
||||
m_glWidget->stopTimerEvent();
|
||||
|
||||
QFileInfo currentSong = m_settings->getCurrentSongLongFileName();
|
||||
|
||||
QString dir;
|
||||
|
@ -660,7 +648,6 @@ void QtWindow::open()
|
|||
m_settings->openSongFile(fileName);
|
||||
setCurrentFile(fileName);
|
||||
}
|
||||
m_glWidget->startTimerEvent();
|
||||
}
|
||||
|
||||
void QtWindow::readSettings()
|
||||
|
|
Loading…
Reference in New Issue