--- gigedit/trunk/src/gigedit/dimregionedit.cpp 2019/01/27 15:58:04 3457 +++ gigedit/trunk/src/gigedit/dimregionedit.cpp 2019/01/31 18:43:09 3458 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2017 Andreas Persson + * Copyright (C) 2006-2019 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -321,26 +321,16 @@ &gig::DimensionRegion::EG1ControllerDecayInfluence); connect(eEG1ControllerReleaseInfluence, &gig::DimensionRegion::EG1ControllerReleaseInfluence); - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG1Options.AttackCancel)); - connect(eEG1StateOptions.checkBoxAttack, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG1Options.AttackHoldCancel)); - connect(eEG1StateOptions.checkBoxAttackHold, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG1Options.Decay1Cancel)); - connect(eEG1StateOptions.checkBoxDecay1, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG1Options.Decay2Cancel)); - connect(eEG1StateOptions.checkBoxDecay2, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG1Options.ReleaseCancel)); - connect(eEG1StateOptions.checkBoxRelease, mp.pmember); - } + connect(eEG1StateOptions.checkBoxAttack, &gig::DimensionRegion::EG1Options, + &gig::eg_opt_t::AttackCancel); + connect(eEG1StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG1Options, + &gig::eg_opt_t::AttackHoldCancel); + connect(eEG1StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG1Options, + &gig::eg_opt_t::Decay1Cancel); + connect(eEG1StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG1Options, + &gig::eg_opt_t::Decay2Cancel); + connect(eEG1StateOptions.checkBoxRelease, &gig::DimensionRegion::EG1Options, + &gig::eg_opt_t::ReleaseCancel); connect(eLFO1Frequency, &gig::DimensionRegion::LFO1Frequency); connect(eLFO1InternalDepth, &gig::DimensionRegion::LFO1InternalDepth); connect(eLFO1ControlDepth, &gig::DimensionRegion::LFO1ControlDepth); @@ -362,26 +352,16 @@ &gig::DimensionRegion::EG2ControllerDecayInfluence); connect(eEG2ControllerReleaseInfluence, &gig::DimensionRegion::EG2ControllerReleaseInfluence); - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG2Options.AttackCancel)); - connect(eEG2StateOptions.checkBoxAttack, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG2Options.AttackHoldCancel)); - connect(eEG2StateOptions.checkBoxAttackHold, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG2Options.Decay1Cancel)); - connect(eEG2StateOptions.checkBoxDecay1, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG2Options.Decay2Cancel)); - connect(eEG2StateOptions.checkBoxDecay2, mp.pmember); - } - { - ClassMemberPtr mp(offsetof(gig::DimensionRegion, EG2Options.ReleaseCancel)); - connect(eEG2StateOptions.checkBoxRelease, mp.pmember); - } + connect(eEG2StateOptions.checkBoxAttack, &gig::DimensionRegion::EG2Options, + &gig::eg_opt_t::AttackCancel); + connect(eEG2StateOptions.checkBoxAttackHold, &gig::DimensionRegion::EG2Options, + &gig::eg_opt_t::AttackHoldCancel); + connect(eEG2StateOptions.checkBoxDecay1, &gig::DimensionRegion::EG2Options, + &gig::eg_opt_t::Decay1Cancel); + connect(eEG2StateOptions.checkBoxDecay2, &gig::DimensionRegion::EG2Options, + &gig::eg_opt_t::Decay2Cancel); + connect(eEG2StateOptions.checkBoxRelease, &gig::DimensionRegion::EG2Options, + &gig::eg_opt_t::ReleaseCancel); connect(eLFO2Frequency, &gig::DimensionRegion::LFO2Frequency); connect(eLFO2InternalDepth, &gig::DimensionRegion::LFO2InternalDepth); connect(eLFO2ControlDepth, &gig::DimensionRegion::LFO2ControlDepth);