MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / setHasUnsavedChanges

Method setHasUnsavedChanges

src/core/map.cpp:2453–2482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2451}
2452
2453void Map::setHasUnsavedChanges(bool has_unsaved_changes)
2454{
2455 if (!has_unsaved_changes)
2456 {
2457 colors_dirty = false;
2458 symbols_dirty = false;
2459 templates_dirty = false;
2460 objects_dirty = false;
2461 other_dirty = false;
2462 if (unsaved_changes || unsaved_changes_signaled)
2463 {
2464 unsaved_changes = false;
2465 emit hasUnsavedChanged(unsaved_changes);
2466 }
2467 }
2468 else if (!unsaved_changes || !unsaved_changes_signaled)
2469 {
2470 unsaved_changes = true;
2471 emit hasUnsavedChanged(unsaved_changes);
2472 }
2473
2474 if (!signalsBlocked())
2475 {
2476 // Save what has been signaled to observers.
2477 // We update unsaved_changes also when signals are blocked. The extra
2478 // variable helps to ensure that a signal is emitted in the first
2479 // invocation as soon as signals are unblocked.
2480 unsaved_changes_signaled = unsaved_changes;
2481 }
2482}
2483
2484void Map::setOtherDirty()
2485{

Callers 2

newPositionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected