Skip to content

Commit 807d140

Browse files
hugtalbotbakpaulfredroy
authored
Fix compilation further to lifecycle v25.06 (#147)
* Fix compilation with Lifecycle v25.06 * Fix compilation further to lifecycle v25.06 * Remove un-needed CXX flag * Set compilation of plugins by default (#141) * Set compilation by default * Update ci.yml * Update ci.yml * Set priotity to force Imgui as the default GUI (#149) * remove changes unrelated to the PR * Apply suggestions from code review --------- Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
1 parent e47c8b5 commit 807d140

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <sofa/helper/system/FileRepository.h>
3535
#include <sofa/helper/system/FileSystem.h>
3636
#include <sofa/core/visual/VisualParams.h>
37+
#include <sofa/core/objectmodel/BaseClassNameHelper.h>
3738
#include <sofa/core/objectmodel/KeypressedEvent.h>
3839
#include <sofa/core/objectmodel/KeyreleasedEvent.h>
3940
#include <sofa/simulation/Node.h>
@@ -520,11 +521,11 @@ void SofaGLFWBaseGUI::initVisual()
520521
if (!visualStyle)
521522
{
522523
visualStyle = sofa::core::objectmodel::New<VisualStyle>();
523-
visualStyle->setName(helper::NameDecoder::getShortName<decltype(visualStyle.get())>());
524+
visualStyle->setName(sofa::core::objectmodel::BaseClassNameHelper::getShortName<decltype(visualStyle.get())>());
524525

525526
DisplayFlags* displayFlags = visualStyle->d_displayFlags.beginEdit();
526527
displayFlags->setShowVisualModels(tristate::true_value);
527-
visualStyle->displayFlags.endEdit();
528+
visualStyle->d_displayFlags.endEdit();
528529

529530
m_groot->addObject(visualStyle);
530531
visualStyle->init();

SofaGLFW/src/SofaGLFW/SofaGLFWGUI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ void SofaGLFWGUI::centerWindow()
9595

9696
void SofaGLFWGUI::setViewerConfiguration(sofa::component::setting::ViewerSetting* viewerConf)
9797
{
98-
const type::Vec<2, int>& res = viewerConf->resolution.getValue();
98+
const type::Vec<2, int>& res = viewerConf->d_resolution.getValue();
9999

100-
if (viewerConf->fullscreen.getValue())
100+
if (viewerConf->d_fullscreen.getValue())
101101
{
102102
m_bCreateWithFullScreen = true;
103103
}

SofaImGui/src/SofaImGui/windows/Plugins.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <SofaImGui/ImGuiGUIEngine.h>
2424
#include <SofaGLFW/SofaGLFWBaseGUI.h>
2525
#include <sofa/core/loader/SceneLoader.h>
26+
#include <sofa/core/ObjectFactory.h>
2627
#include <sofa/simulation/SceneLoaderFactory.h>
2728
#include <sofa/helper/system/FileSystem.h>
2829
#include <sofa/simulation/Simulation.h>
@@ -98,7 +99,7 @@ namespace windows
9899
ImGui::TextWrapped("%s", pluginIt->second.getModuleDescription());
99100
ImGui::Spacing();
100101
ImGui::TextDisabled("Components:");
101-
ImGui::TextWrapped("%s", pluginIt->second.getModuleComponentList());
102+
ImGui::TextWrapped("%s", sofa::core::ObjectFactory::getInstance()->listClassesFromTarget(pluginIt->second.getModuleName()).c_str());
102103
ImGui::Spacing();
103104
ImGui::TextDisabled("Path:");
104105
ImGui::TextWrapped("%s", selectedPlugin.c_str());

exe/Main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ int main(int argc, char** argv)
105105
groot->get(viewerConf, sofa::core::objectmodel::BaseContext::SearchRoot);
106106
if (viewerConf)
107107
{
108-
if (viewerConf->fullscreen.getValue())
108+
if (viewerConf->d_fullscreen.getValue())
109109
{
110110
isFullScreen = true;
111111
}
112112
else
113113
{
114-
resolution = viewerConf->resolution.getValue();
114+
resolution = viewerConf->d_resolution.getValue();
115115
}
116116
}
117117

0 commit comments

Comments
 (0)