mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-24 03:21:19 +00:00
Proper remov
This commit is contained in:
parent
78935a18ae
commit
7c05245201
@ -818,17 +818,17 @@ void Viewer::setMinLinear(bool on) {
|
|||||||
void Viewer::deleteSelected() {
|
void Viewer::deleteSelected() {
|
||||||
// Remove Shape from its parent
|
// Remove Shape from its parent
|
||||||
if(selectedObj.shape == nullptr) return;
|
if(selectedObj.shape == nullptr) return;
|
||||||
selectedObj.shape->getParent()->getChildren()->erase(
|
// selectedObj.shape->getParent()->getChildren()->erase(
|
||||||
std::remove(selectedObj.shape->getParent()->getChildren()->begin(),
|
// std::remove(selectedObj.shape->getParent()->getChildren()->begin(),
|
||||||
selectedObj.shape->getParent()->getChildren()->end(),
|
// selectedObj.shape->getParent()->getChildren()->end(),
|
||||||
selection),
|
// selection),
|
||||||
selectedObj.shape->getParent()->getChildren()->end());
|
// selectedObj.shape->getParent()->getChildren()->end());
|
||||||
|
|
||||||
selectedObj.shape->getParent()->getChildren()->erase(
|
selectedObj.shape->getParent()->getParent()->getChildren()->erase(
|
||||||
std::remove(selectedObj.shape->getParent()->getChildren()->begin(),
|
std::remove(selectedObj.shape->getParent()->getParent()->getChildren()->begin(),
|
||||||
selectedObj.shape->getParent()->getChildren()->end(),
|
selectedObj.shape->getParent()->getParent()->getChildren()->end(),
|
||||||
selectedObj.shape),
|
selectedObj.shape->getParent()),
|
||||||
selectedObj.shape->getParent()->getChildren()->end());
|
selectedObj.shape->getParent()->getParent()->getChildren()->end());
|
||||||
|
|
||||||
selectedObj.shape = nullptr; // Rebind to "null"
|
selectedObj.shape = nullptr; // Rebind to "null"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user