Skip to content

Commit

Permalink
linker fix & reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfedcafe committed Dec 26, 2024
1 parent 5fabb66 commit 7cbaa64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 7 additions & 2 deletions library/src/interactor_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include "window_impl.h"

#include "vtkF3DConsoleOutputWindow.h"

#if F3D_MODULE_UI
#include "vtkF3DImguiConsole.h"
#endif

#include "vtkF3DInteractorEventRecorder.h"
#include "vtkF3DInteractorStyle.h"
#include "vtkF3DRenderer.h"
Expand Down Expand Up @@ -608,13 +612,14 @@ interactor& interactor_impl::initCommands()
[&](const std::vector<std::string>& args)
{
check_args(args, 0, "clear");

#if F3D_MODULE_UI
vtkF3DImguiConsole* console =
vtkF3DImguiConsole::SafeDownCast(vtkOutputWindow::GetInstance());
if (console)
{
console->Clear();
}
#endif
});
this->addCommand("print",
[&](const std::vector<std::string>& args)
Expand Down Expand Up @@ -994,7 +999,7 @@ interactor& interactor_impl::removeBinding(const interaction_bind_t& bind)
// Look for the group of the removed bind
std::string group;
for (auto it = this->Internals->GroupedBinds.begin(); it != this->Internals->GroupedBinds.end();
it++)
it++)
{
if (it->second == bind)
{
Expand Down
7 changes: 2 additions & 5 deletions library/testing/TestSDKInteractorCommand.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <engine.h>
#include <interactor.h>
#include <options.h>
#include <vtkF3DImguiConsole.h>

int TestSDKInteractorCommand(int argc, char* argv[])
{
Expand All @@ -26,10 +25,8 @@ int TestSDKInteractorCommand(int argc, char* argv[])
test("triggerCommand reset optional", options.render.hdri.file.has_value() == false);

// Test clear
vtkF3DImguiConsole* console = vtkF3DImguiConsole::SafeDownCast(vtkOutputWindow::GetInstance());
const size_t beforeSize = console->GetLogsSize();
inter.triggerCommand("clear");
test("triggerCommand clear", console->GetLogsSize() == 0 && beforeSize > 0);
inter.triggerCommand("print_scene_info");
test("triggerCommand clear", (inter.triggerCommand("clear") == true));

// Test toggle
inter.triggerCommand("toggle model.scivis.cells");
Expand Down

0 comments on commit 7cbaa64

Please sign in to comment.