1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

Removed some unnecessary isOnTouchDevice() checks in the AudioPluginHost

This commit is contained in:
ed 2020-07-15 14:42:32 +01:00
parent 2f9b301cb7
commit f0c90e4c12
2 changed files with 9 additions and 11 deletions

View file

@ -149,7 +149,11 @@ static PluginHostApp& getApp() { return *dynamic_cast<PluginH
ApplicationProperties& getAppProperties() { return *getApp().appProperties; }
ApplicationCommandManager& getCommandManager() { return getApp().commandManager; }
bool isOnTouchDevice() { return Desktop::getInstance().getMainMouseSource().isTouch(); }
bool isOnTouchDevice()
{
static bool isTouch = Desktop::getInstance().getMainMouseSource().isTouch();
return isTouch;
}
// This kicks the whole thing off..
START_JUCE_APPLICATION (PluginHostApp)

View file

@ -1189,11 +1189,8 @@ void GraphDocumentComponent::init()
if (isOnTouchDevice())
{
if (isOnTouchDevice())
{
titleBarComponent.reset (new TitleBarComponent (*this));
addAndMakeVisible (titleBarComponent.get());
}
titleBarComponent.reset (new TitleBarComponent (*this));
addAndMakeVisible (titleBarComponent.get());
pluginListBoxModel.reset (new PluginListBoxModel (pluginListBox, pluginList));
@ -1206,11 +1203,8 @@ void GraphDocumentComponent::init()
0, 2, 0, 2,
true, true, true, false));
if (isOnTouchDevice())
{
addAndMakeVisible (pluginListSidePanel);
addAndMakeVisible (mobileSettingsSidePanel);
}
addAndMakeVisible (pluginListSidePanel);
addAndMakeVisible (mobileSettingsSidePanel);
}
}