Browse Source

Removed some unnecessary isOnTouchDevice() checks in the AudioPluginHost

tags/2021-05-28
ed 5 years ago
parent
commit
f0c90e4c12
2 changed files with 9 additions and 11 deletions
  1. +5
    -1
      extras/AudioPluginHost/Source/HostStartup.cpp
  2. +4
    -10
      extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp

+ 5
- 1
extras/AudioPluginHost/Source/HostStartup.cpp 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)

+ 4
- 10
extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp 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);
}
}


Loading…
Cancel
Save