Refactor CRobotMain::DeleteObject -> DestroySelectedObject
parent
b1e383f89e
commit
44a1f85891
|
@ -991,7 +991,7 @@ bool CRobotMain::ProcessEvent(Event &event)
|
||||||
|
|
||||||
case EVENT_OBJECT_DELETE:
|
case EVENT_OBJECT_DELETE:
|
||||||
m_ui->GetDialog()->StartQuestion(RT_DIALOG_DELOBJ, true, false, false, [&]() {
|
m_ui->GetDialog()->StartQuestion(RT_DIALOG_DELOBJ, true, false, false, [&]() {
|
||||||
DeleteObject();
|
DestroySelectedObject();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1983,7 +1983,7 @@ bool CRobotMain::IsSelectable(CObject* obj)
|
||||||
|
|
||||||
|
|
||||||
//! Deletes the selected object
|
//! Deletes the selected object
|
||||||
bool CRobotMain::DeleteObject()
|
bool CRobotMain::DestroySelectedObject()
|
||||||
{
|
{
|
||||||
CObject* obj = GetSelect();
|
CObject* obj = GetSelect();
|
||||||
if (obj == nullptr) return false;
|
if (obj == nullptr) return false;
|
||||||
|
|
|
@ -198,7 +198,6 @@ public:
|
||||||
bool SelectObject(CObject* pObj, bool displayError=true);
|
bool SelectObject(CObject* pObj, bool displayError=true);
|
||||||
CObject* GetSelectObject();
|
CObject* GetSelectObject();
|
||||||
CObject* DeselectAll();
|
CObject* DeselectAll();
|
||||||
bool DeleteObject();
|
|
||||||
|
|
||||||
void ResetObject();
|
void ResetObject();
|
||||||
void UpdateAudio(bool frame);
|
void UpdateAudio(bool frame);
|
||||||
|
@ -413,6 +412,7 @@ protected:
|
||||||
|
|
||||||
int AutosaveRotate(bool freeOne);
|
int AutosaveRotate(bool freeOne);
|
||||||
void Autosave();
|
void Autosave();
|
||||||
|
bool DestroySelectedObject();
|
||||||
void PushToSelectionHistory(CObject* obj);
|
void PushToSelectionHistory(CObject* obj);
|
||||||
CObject* PopFromSelectionHistory();
|
CObject* PopFromSelectionHistory();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue