Skip to content

Commit

Permalink
fix: Live View constantly searching
Browse files Browse the repository at this point in the history
This happened even if the user wasn't on the live view tab.
It didn't happen if the GUI was turned off in the ini file.

Also fixed a bug where 'object_full_name.find(name_to_search_by)' would return 0 instead of npos if 'name_to_search_by' was an empty string.
  • Loading branch information
UE4SS committed Apr 18, 2024
1 parent cb5823d commit 7a43bbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion UE4SS/src/GUI/LiveView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ namespace RC::GUI
{
// TODO: Stop using the 'HashObject' function when needing the address of an FFieldClassVariant because it's not designed to return an address.
// Maybe make the ToFieldClass/ToUClass functions public (append 'Unsafe' to the function names).
if (LiveView::s_need_to_filter_out_properties && object->IsA(std::bit_cast<UClass*>(FProperty::StaticClass().HashObject())))
if (LiveView::s_name_to_search_by.empty() ||
LiveView::s_need_to_filter_out_properties && object->IsA(std::bit_cast<UClass*>(FProperty::StaticClass().HashObject())))
{
return;
}
Expand Down
1 change: 0 additions & 1 deletion UE4SS/src/UE4SSProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@ namespace RC
if (settings_manager.General.UseUObjectArrayCache)
{
m_debugging_gui.get_live_view().set_listeners_allowed(true);
m_debugging_gui.get_live_view().set_listeners();
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions assets/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ Fixes BPModLoaderMod not loading when UE4SS initializes too late ([UE4SS #454](h

Fixed PalServer not accepting connections from players ([UE4SS #453](https://github.com/UE4SS-RE/RE-UE4SS/pull/453))

Fixed a crash that would occur randomly due to accidental execution of Live View search code ([UE4SS #475](https://github.com/UE4SS-RE/RE-UE4SS/pull/475))

### Live View
Fixed the "Write to file" checkbox not working for functions in the `Watches` tab ([UE4SS #419](https://github.com/UE4SS-RE/RE-UE4SS/pull/419))

Reduced the likelihood of a crash happening on shutdown when at least one watch is enabled ([UE4SS #419](https://github.com/UE4SS-RE/RE-UE4SS/pull/419))

Fixed constantly searching even if the search field is empty, and even if not on the tab ([UE4SS #475](https://github.com/UE4SS-RE/RE-UE4SS/pull/475))

### UHT Dumper

### Lua API
Expand Down

0 comments on commit 7a43bbe

Please sign in to comment.