MCPcopy Create free account
hub / github.com/audacity/audacity / OnSnapModeChanged

Method OnSnapModeChanged

src/toolbars/SnappingToolBar.cpp:413–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413void SnappingToolBar::OnSnapModeChanged()
414{
415 const bool snapEnabled = mSnapModeCheckBox->GetValue();
416
417 ProjectSnap::Get(mProject).SetSnapMode(
418 snapEnabled ? SnapMode::SNAP_NEAREST : SnapMode::SNAP_OFF);
419
420 mSnapToCombo->Enable(snapEnabled);
421
422
423 // wxEVT_KILL_FOCUS is not always sent by wxWidgets.
424 // Remove any selection from the combo box if we've disabled it.
425 if (!snapEnabled)
426 mSnapToCombo->SelectNone();
427}
428
429static RegisteredToolbarFactory factory{
430 []( AudacityProject &project ){

Callers

nothing calls this directly

Calls 5

GetFunction · 0.85
SetSnapModeMethod · 0.80
SelectNoneMethod · 0.80
GetValueMethod · 0.45
EnableMethod · 0.45

Tested by

no test coverage detected