Loading optimization (no GUI changes)

This commit is contained in:
Dmitry K 2024-09-26 22:20:48 +00:00 committed by Adam Honse
parent 7e96e0efa5
commit 2c952a54d2
7 changed files with 277 additions and 182 deletions

View file

@ -433,7 +433,6 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
plugin_manager = new PluginManager();
plugin_manager->RegisterAddPluginCallback(&CreatePluginCallback, this);
plugin_manager->RegisterRemovePluginCallback(&DeletePluginCallback, this);
plugin_manager->ScanAndLoadPlugins();
/*-----------------------------------------------------*\
| Add the Plugins page |
@ -1448,10 +1447,19 @@ void OpenRGBDialog2::onDetectionProgressUpdated()
void OpenRGBDialog2::onDetectionEnded()
{
/*-----------------------------------------------------*\
| Detect unconfigured zones and prompt for resizing |
\*-----------------------------------------------------*/
/*-------------------------------------------------------*\
| Detect unconfigured zones and prompt for resizing |
\*-------------------------------------------------------*/
OpenRGBZonesBulkResizer::RunChecks(this);
/*-------------------------------------------------------*\
| Load plugins after the first detection (ONLY the first) |
\*-------------------------------------------------------*/
if(!plugins_loaded)
{
plugin_manager->ScanAndLoadPlugins();
plugins_loaded = true;
}
}
void OpenRGBDialog2::on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue)

View file

@ -108,6 +108,7 @@ private:
OpenRGBNanoleafSettingsPage *NanoleafSettingsPage;
bool ShowI2CTools = false;
bool plugins_loaded = false;
/*-------------------------------------*\
| System tray icon and menu |
@ -188,5 +189,4 @@ private slots:
void on_InformationTabBar_currentChanged(int);
void on_DevicesTabBar_currentChanged(int);
void on_SettingsTabBar_currentChanged(int);
};