Retrieving data from preferences
Signed-off-by: igarri <igarri@amazon.com>
This commit is contained in:
+12
-11
@@ -8,6 +8,8 @@
|
||||
#include <AssetBrowser/AssetBrowserTableModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Entries/AssetBrowserEntry.h>
|
||||
|
||||
#pragma optimize("", off)
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
namespace AssetBrowser
|
||||
@@ -151,24 +153,23 @@ namespace AzToolsFramework
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome outcome;
|
||||
AzToolsFramework::EditorSettingsAPIBus::BroadcastResult(outcome, &AzToolsFramework::EditorSettingsAPIBus::Handler::GetValue,
|
||||
"Settings|MaxDisplayedItemsNumInSearch");
|
||||
//AzToolsFramework::EditorSettingsAPIBus::BroadcastResult(
|
||||
// outcome, &AzToolsFramework::EditorSettingsAPIBus::Handler::GetValue,
|
||||
// "Settings\ExperimentalFeatures|TotalIlluminationEnabled");
|
||||
AzToolsFramework::EditorSettingsAPIRequests::SettingOutcome outcome;
|
||||
AzToolsFramework::EditorSettingsAPIBus::BroadcastResult(outcome, &AzToolsFramework::EditorSettingsAPIBus::Handler::GetValue,
|
||||
"Settings|MaxDisplayedItemsNumInSearch");
|
||||
|
||||
AZStd::any* outcomeValue = &outcome.GetValue<AZStd::any>();
|
||||
//bool trr = false;
|
||||
if (outcomeValue->is<int>() == true)
|
||||
AZStd::any outcomeValue = outcome.GetValue<AZStd::any>();
|
||||
if (outcomeValue.is<int>() == true)
|
||||
{
|
||||
m_numberOfItemsDisplayed = AZStd::any_cast<int>(*outcomeValue);
|
||||
//trr = AZStd::any_cast<bool>(outcomeValue);
|
||||
m_numberOfItemsDisplayed = AZStd::any_cast<int>(outcome.GetValue());
|
||||
}
|
||||
|
||||
AzToolsFramework::EditorSettingsAPIBus::BroadcastResult(
|
||||
m_numberOfItemsDisplayed, &AzToolsFramework::EditorSettingsAPIBus::Handler::GetMaxNumberOfItemsShownInSearchView);
|
||||
|
||||
BuildTableModelMap(sourceModel());
|
||||
emit layoutChanged();
|
||||
}
|
||||
} // namespace AssetBrowser
|
||||
} // namespace AzToolsFramework
|
||||
#include "AssetBrowser/moc_AssetBrowserTableModel.cpp"
|
||||
#pragma optimize("", on)
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace AzToolsFramework
|
||||
virtual SettingOutcome GetValue(const AZStd::string_view path) = 0;
|
||||
virtual SettingOutcome SetValue(const AZStd::string_view path, const AZStd::any& value) = 0;
|
||||
virtual ConsoleColorTheme GetConsoleColorTheme() const = 0;
|
||||
virtual int GetMaxNumberOfItemsShownInSearchView() const = 0;
|
||||
};
|
||||
|
||||
using EditorSettingsAPIBus = AZ::EBus<EditorSettingsAPIRequests>;
|
||||
|
||||
Reference in New Issue
Block a user