()
| 234 | } |
| 235 | |
| 236 | func (project *Project) Update() { |
| 237 | |
| 238 | if globals.NextProject != nil && globals.NextProject != project { |
| 239 | // You're the old project, so you can just chill. We do this |
| 240 | // because otherwise, a card may use a resource that got destroyed |
| 241 | // to render. |
| 242 | return |
| 243 | } |
| 244 | |
| 245 | project.AutoBackup() |
| 246 | |
| 247 | project.Camera.Update() |
| 248 | |
| 249 | globals.Mouse.HiddenPosition = false |
| 250 | |
| 251 | for _, page := range project.Pages { |
| 252 | if page.Valid() { |
| 253 | page.Update() |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | globals.Mouse.HiddenPosition = false |
| 258 | |
| 259 | project.GlobalShortcuts() |
| 260 | |
| 261 | globals.InputText = []rune{} |
| 262 | |
| 263 | project.UndoHistory.Update() |
| 264 | |
| 265 | // This should only be true for a total of essentially 1 or 2 frames, immediately after loading |
| 266 | project.Loading = false |
| 267 | |
| 268 | if project.Modified && project.justModified { |
| 269 | globals.Dispatcher.Run() |
| 270 | } |
| 271 | |
| 272 | project.justModified = false |
| 273 | |
| 274 | } |
| 275 | |
| 276 | // SetModifiedState sets the modified variable for the Project to true, but also sets justModified to true, allowing the Dispatcher to run to make things happen when the project is altered in some appreciable way. |
| 277 | func (project *Project) SetModifiedState() { |
nothing calls this directly
no test coverage detected