move undohistorylimit config pref, change default to 5

This commit is contained in:
jacob1 2017-02-18 23:58:14 -05:00
parent 61e19a3237
commit 08a7dfebea

View File

@ -136,7 +136,7 @@ GameModel::GameModel():
colourPresets.push_back(ui::Colour(0, 0, 255));
colourPresets.push_back(ui::Colour(0, 0, 0));
undoHistoryLimit = Client::Ref().GetPrefInteger("UndoHistoryLimit", 1);
undoHistoryLimit = Client::Ref().GetPrefInteger("Simulation.UndoHistoryLimit", 5);
// cap due to memory usage (this is about 3.4GB of RAM)
if (undoHistoryLimit > 200)
undoHistoryLimit = 200;
@ -167,7 +167,7 @@ GameModel::~GameModel()
Client::Ref().SetPref("Decoration.Blue", (int)colour.Blue);
Client::Ref().SetPref("Decoration.Alpha", (int)colour.Alpha);
Client::Ref().SetPref("UndoHistoryLimit", undoHistoryLimit);
Client::Ref().SetPref("Simulation.UndoHistoryLimit", undoHistoryLimit);
Favorite::Ref().SaveFavoritesToPrefs();