upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -156,7 +156,7 @@ void TableHeaderComponent::moveColumn (const int columnId, int newIndex)
|
||||
auto currentIndex = getIndexOfColumnId (columnId, false);
|
||||
newIndex = visibleIndexToTotalIndex (newIndex);
|
||||
|
||||
if (columns [currentIndex] != 0 && currentIndex != newIndex)
|
||||
if (columns[currentIndex] != nullptr && currentIndex != newIndex)
|
||||
{
|
||||
columns.move (currentIndex, newIndex);
|
||||
sendColumnsChanged();
|
||||
@ -436,40 +436,42 @@ String TableHeaderComponent::toString() const
|
||||
|
||||
void TableHeaderComponent::restoreFromString (const String& storedVersion)
|
||||
{
|
||||
std::unique_ptr<XmlElement> storedXml (XmlDocument::parse (storedVersion));
|
||||
int index = 0;
|
||||
|
||||
if (storedXml != nullptr && storedXml->hasTagName ("TABLELAYOUT"))
|
||||
if (auto storedXML = parseXML (storedVersion))
|
||||
{
|
||||
forEachXmlChildElement (*storedXml, col)
|
||||
if (storedXML->hasTagName ("TABLELAYOUT"))
|
||||
{
|
||||
auto tabId = col->getIntAttribute ("id");
|
||||
int index = 0;
|
||||
|
||||
if (auto* ci = getInfoForId (tabId))
|
||||
forEachXmlChildElement (*storedXML, col)
|
||||
{
|
||||
columns.move (columns.indexOf (ci), index);
|
||||
ci->width = col->getIntAttribute ("width");
|
||||
setColumnVisible (tabId, col->getBoolAttribute ("visible"));
|
||||
auto tabId = col->getIntAttribute ("id");
|
||||
|
||||
if (auto* ci = getInfoForId (tabId))
|
||||
{
|
||||
columns.move (columns.indexOf (ci), index);
|
||||
ci->width = col->getIntAttribute ("width");
|
||||
setColumnVisible (tabId, col->getBoolAttribute ("visible"));
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
++index;
|
||||
columnsResized = true;
|
||||
sendColumnsChanged();
|
||||
|
||||
setSortColumnId (storedXML->getIntAttribute ("sortedCol"),
|
||||
storedXML->getBoolAttribute ("sortForwards", true));
|
||||
}
|
||||
|
||||
columnsResized = true;
|
||||
sendColumnsChanged();
|
||||
|
||||
setSortColumnId (storedXml->getIntAttribute ("sortedCol"),
|
||||
storedXml->getBoolAttribute ("sortForwards", true));
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void TableHeaderComponent::addListener (Listener* const newListener)
|
||||
void TableHeaderComponent::addListener (Listener* newListener)
|
||||
{
|
||||
listeners.addIfNotAlreadyThere (newListener);
|
||||
}
|
||||
|
||||
void TableHeaderComponent::removeListener (Listener* const listenerToRemove)
|
||||
void TableHeaderComponent::removeListener (Listener* listenerToRemove)
|
||||
{
|
||||
listeners.removeFirstMatchingValue (listenerToRemove);
|
||||
}
|
||||
@ -499,11 +501,11 @@ void TableHeaderComponent::reactToMenuItem (const int menuReturnId, const int /*
|
||||
|
||||
void TableHeaderComponent::paint (Graphics& g)
|
||||
{
|
||||
LookAndFeel& lf = getLookAndFeel();
|
||||
auto& lf = getLookAndFeel();
|
||||
|
||||
lf.drawTableHeaderBackground (g, *this);
|
||||
|
||||
const Rectangle<int> clip (g.getClipBounds());
|
||||
auto clip = g.getClipBounds();
|
||||
|
||||
int x = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user