mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-10 12:36:53 +03:00
Fix(CS): Fix minor issue in deleteSelectedInstances impl which caused it
to run twice
This commit is contained in:
parent
7069a970ae
commit
bc662aeb63
2 changed files with 3 additions and 4 deletions
|
@ -202,8 +202,7 @@ CSVRender::InstanceMode::InstanceMode(
|
||||||
connect(this, &InstanceMode::requestFocus, worldspaceWidget, &WorldspaceWidget::requestFocus);
|
connect(this, &InstanceMode::requestFocus, worldspaceWidget, &WorldspaceWidget::requestFocus);
|
||||||
|
|
||||||
CSMPrefs::Shortcut* deleteShortcut = new CSMPrefs::Shortcut("scene-delete", worldspaceWidget);
|
CSMPrefs::Shortcut* deleteShortcut = new CSMPrefs::Shortcut("scene-delete", worldspaceWidget);
|
||||||
connect(
|
connect(deleteShortcut, qOverload<>(&CSMPrefs::Shortcut::activated), this, &InstanceMode::deleteSelectedInstances);
|
||||||
deleteShortcut, qOverload<bool>(&CSMPrefs::Shortcut::activated), this, &InstanceMode::deleteSelectedInstances);
|
|
||||||
|
|
||||||
CSMPrefs::Shortcut* duplicateShortcut = new CSMPrefs::Shortcut("scene-duplicate", worldspaceWidget);
|
CSMPrefs::Shortcut* duplicateShortcut = new CSMPrefs::Shortcut("scene-duplicate", worldspaceWidget);
|
||||||
|
|
||||||
|
@ -1075,7 +1074,7 @@ void CSVRender::InstanceMode::handleSelectDrag(const QPoint& pos)
|
||||||
mDragMode = DragMode_None;
|
mDragMode = DragMode_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::InstanceMode::deleteSelectedInstances(bool active)
|
void CSVRender::InstanceMode::deleteSelectedInstances()
|
||||||
{
|
{
|
||||||
std::vector<osg::ref_ptr<TagBase>> selection = getWorldspaceWidget().getSelection(Mask_Reference);
|
std::vector<osg::ref_ptr<TagBase>> selection = getWorldspaceWidget().getSelection(Mask_Reference);
|
||||||
if (selection.empty())
|
if (selection.empty())
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace CSVRender
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void subModeChanged(const std::string& id);
|
void subModeChanged(const std::string& id);
|
||||||
void deleteSelectedInstances(bool active);
|
void deleteSelectedInstances();
|
||||||
void cloneSelectedInstances();
|
void cloneSelectedInstances();
|
||||||
void dropSelectedInstancesToCollision();
|
void dropSelectedInstancesToCollision();
|
||||||
void dropSelectedInstancesToTerrain();
|
void dropSelectedInstancesToTerrain();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue