Skip to content

Commit

Permalink
Prefmanager updated when fps changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlamhauge committed Apr 21, 2020
1 parent dc67dd7 commit bfd6506
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/mainwindow2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@ void MainWindow2::makeConnections(Editor* pEditor, TimeLine* pTimeline)

connect(pTimeline, &TimeLine::soundClick, pPlaybackManager, &PlaybackManager::enableSound);
connect(pTimeline, &TimeLine::fpsChanged, pPlaybackManager, &PlaybackManager::setFps);
connect(pTimeline, &TimeLine::fpsChanged, pEditor, &Editor::setFps);

connect(pTimeline, &TimeLine::addKeyClick, mCommands, &ActionCommands::addNewKey);
connect(pTimeline, &TimeLine::removeKeyClick, mCommands, &ActionCommands::removeKey);
Expand Down
5 changes: 5 additions & 0 deletions core_lib/src/interface/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ int Editor::fps()
return mPlaybackManager->fps();
}

void Editor::setFps(int fps)
{
mPreferenceManager->set(SETTING::FPS, fps);
}

void Editor::makeConnections()
{
connect(mPreferenceManager, &PreferenceManager::optionChanged, this, &Editor::settingUpdated);
Expand Down
1 change: 1 addition & 0 deletions core_lib/src/interface/editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class Editor : public QObject

int currentFrame();
int fps();
void setFps(int fps);

int currentLayerIndex() { return mCurrentLayerIndex; }
void setCurrentLayerIndex(int i);
Expand Down

0 comments on commit bfd6506

Please sign in to comment.