Skip to content

Commit ac4e66d

Browse files
alxbilgerdamienmarchalhugtalbot
authored
Fix rightBeforeLoadingScene method overloading (#585)
* Fix rightBeforeLoadingScene method overloading * Remove virtual keyword Co-authored-by: Damien Marchal <damien.marchal@univ-lille1.fr> --------- Co-authored-by: Damien Marchal <damien.marchal@univ-lille1.fr> Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
1 parent 707fdc8 commit ac4e66d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Plugin/src/SofaPython3/PythonEnvironment.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,9 @@ void PythonEnvironment::setArguments(const std::string& filename, const std::vec
606606
PySys_SetArgvEx( data->size(), data->getDataBuffer(), 0);
607607
}
608608

609-
void PythonEnvironment::SceneLoaderListerner::rightBeforeLoadingScene()
609+
void PythonEnvironment::SceneLoaderListerner::rightBeforeLoadingScene(SceneLoader* sceneLoader)
610610
{
611+
SOFA_UNUSED(sceneLoader);
611612
// unload python modules to force importing their eventual modifications
612613
executePython([]{ PyRun_SimpleString("SofaRuntime.unloadModules()");});
613614
}

Plugin/src/SofaPython3/PythonEnvironment.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ class SOFAPYTHON3_API PythonEnvironment
120120
/// to be able to react when a scene is loaded
121121
struct SceneLoaderListerner : public SceneLoader::Listener
122122
{
123-
using SceneLoader::Listener::rightBeforeLoadingScene;
124123
/// possibly unload python modules to force importing their eventual modifications
125-
virtual void rightBeforeLoadingScene();
124+
void rightBeforeLoadingScene(SceneLoader* sceneLoader) override;
126125
static SceneLoaderListerner* getInstance() {
127126
static SceneLoaderListerner sceneLoaderListerner;
128127
return &sceneLoaderListerner; }

0 commit comments

Comments
 (0)