Skip to content

Commit f598ed4

Browse files
committed
expose deleting a viewpoint in GUI
1 parent 23e69e6 commit f598ed4

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/OpenCOVER/plugins/general/ViewPoint/ViewDesc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ void ViewDesc::createButtons(const char *name,
399399
showAvatar_->setCallback([this](bool state)
400400
{ showAvatar(state); });
401401

402+
deleteButton_ = new ui::Action(editVPMenu_, "Delete");
403+
deleteButton_->setCallback([this, master]() { master->deleteViewPoint(id_); });
404+
402405
if (isChangeable_ && isChangeableFromCover_)
403406
{
404407
changeButton_ = new ui::Action("Change", this);

src/OpenCOVER/plugins/general/ViewPoint/ViewDesc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class ViewDesc: public opencover::ui::Owner
7979
opencover::ui::Action *button_ = nullptr; //< button in Viepoints menu
8080
opencover::ui::Action *changeButton_ = nullptr; //< button for change in Viepoints menu
8181
opencover::ui::Button *flightButton_ = nullptr; // button in flight menu
82+
opencover::ui::Action *deleteButton_ = nullptr; //< button for removing viewpoint, in Viepoints menu
8283
bool hasScale_ = false;
8384
bool isViewAll_ = false;
8485
bool hasPosition_ = false;

0 commit comments

Comments
 (0)