Ruth Madoc's family were asked if they wanted to keep her final scenes in 'Beyond Paradise'.
The 'Hi-de-Hi!' legend passed away in December aged 79, but she is set to posthumously appear in the forthcoming BBC show, a spin-off of 'Death in Paradise', and the show's bosses were prepared to cut the scenes if it was her family's wishes.
'Beyond Paradise' writer Tony Jordan said: "It’s a cameo but she’s so amazing.
"We had to consider her family, before we decided whether she should stay in the show.
"Tim [Key] had conversations with them."
Tony admits it is "bittersweet" that Ruth's final appearance is in the new show.
He added: "You have to respect the wishes of the person who has since died but what’s bittersweet is that it is her final TV appearance, after such a wonderful career.
"So many of us grew up with her as Gladys in 'Hi-de-Hi'!”
Ruth will play Rosie Colbert in the BBC spin-off, and the late star's daughter Lowri recently admitted her mum loved filming the show.
She said: "My mum thoroughly enjoyed working on this, her last TV role.
"She told me how wonderful the entire cast and crew were and what a delightful experience it had been. She took great pride in this job, as she always did with every job.
"I find it brings me great comfort to watch her onscreen."
The six-part series will see Kris Marshall reprise his role as DI Humphrey Goodman, who he played in 'Death in Paradise' from 2014 to 2017, and he will appear alongside several guest stars, including 'Sex Education' actress Samantha Spiro and former 'EastEnders' stars Davood Ghadami and Annette Badland.
Other guest stars include Samantha's 'Sex Education' co-star Chris Jenks, as well as Jamie Bamber, Phil Daniels, Jade Harrison, Monsterrat Lombard, Yasmine Akram, Rufus Jones, and Dan Mersh.
They will star opposite series regulars Sally Bretton (Martha Lloyd), Zahra Ahmadi (DS Esther Williams), Dylan Llewellyn (PC Kelby Hartford), Felicity Montagu (office support Margo Martins) and Barbara Flynn (Anne Lloyd).
'Beyond Paradise' will follow Humphrey and his fiancée Martha after their nail-biting will-they-won't-they romance reached its emotional finale in Saint Marie in 2017.
The pair will arrive in the fictional Devonshire town of Shipton Abbott, Martha's hometown near the beautiful Devonshire coast, after they left London.
'Beyond Paradise' launches on BBC One and iPlayer in the UK on Friday (24.02.23), when it will also be available on BritBox International outside of the UK and Ireland.
Tagged in Kris Marshall Jane Austen Tom Parker