RAM2118 commited on
Commit
c0c12b8
·
verified ·
1 Parent(s): 1066aac

fix: replace getColour() with bool flag (Label has no getColour in JUCE 8)

Browse files
Source/Plugin/PluginBridgeEditor.cpp CHANGED
@@ -55,6 +55,7 @@ PluginBridgeEditor::PluginBridgeEditor(PluginBridgeProcessor& p)
55
  {
56
  pluginStatusLabel.setText(error, juce::dontSendNotification);
57
  pluginStatusLabel.setColour(juce::Label::textColourId, kRed);
 
58
  });
59
  };
60
 
@@ -123,8 +124,9 @@ void PluginBridgeEditor::timerCallback()
123
  selectButton.setButtonText(processorRef.getLoadedPluginName());
124
  pluginStatusLabel.setText(juce::String(processorRef.getLoadedPluginParamCount()) + " params", juce::dontSendNotification);
125
  pluginStatusLabel.setColour(juce::Label::textColourId, kGreen);
 
126
  }
127
- else if (pluginStatusLabel.getColour(juce::Label::textColourId) != kRed)
128
  {
129
  selectButton.setButtonText("Select Plugin");
130
  pluginStatusLabel.setText("No plugin loaded", juce::dontSendNotification);
@@ -146,6 +148,8 @@ void PluginBridgeEditor::embedPluginEditor()
146
  auto editorWidth = std::max(hostedEditor->getWidth(), kDefaultWidth);
147
  auto editorHeight = hostedEditor->getHeight() + kTopBarHeight;
148
  setSize(editorWidth, editorHeight);
 
 
149
  }
150
 
151
  void PluginBridgeEditor::removePluginEditor()
@@ -211,6 +215,7 @@ void PluginBridgeEditor::showPluginMenu()
211
  {
212
  pluginStatusLabel.setText("Loading...", juce::dontSendNotification);
213
  pluginStatusLabel.setColour(juce::Label::textColourId, kTextSecondary);
 
214
  processorRef.loadPlugin(files[result - 1].getFullPathName());
215
  }
216
  });
 
55
  {
56
  pluginStatusLabel.setText(error, juce::dontSendNotification);
57
  pluginStatusLabel.setColour(juce::Label::textColourId, kRed);
58
+ showingError = true;
59
  });
60
  };
61
 
 
124
  selectButton.setButtonText(processorRef.getLoadedPluginName());
125
  pluginStatusLabel.setText(juce::String(processorRef.getLoadedPluginParamCount()) + " params", juce::dontSendNotification);
126
  pluginStatusLabel.setColour(juce::Label::textColourId, kGreen);
127
+ showingError = false;
128
  }
129
+ else if (!showingError)
130
  {
131
  selectButton.setButtonText("Select Plugin");
132
  pluginStatusLabel.setText("No plugin loaded", juce::dontSendNotification);
 
148
  auto editorWidth = std::max(hostedEditor->getWidth(), kDefaultWidth);
149
  auto editorHeight = hostedEditor->getHeight() + kTopBarHeight;
150
  setSize(editorWidth, editorHeight);
151
+
152
+ showingError = false;
153
  }
154
 
155
  void PluginBridgeEditor::removePluginEditor()
 
215
  {
216
  pluginStatusLabel.setText("Loading...", juce::dontSendNotification);
217
  pluginStatusLabel.setColour(juce::Label::textColourId, kTextSecondary);
218
+ showingError = false;
219
  processorRef.loadPlugin(files[result - 1].getFullPathName());
220
  }
221
  });