Skip to content

Commit 710c135

Browse files
committed
Save record path on settings file
1 parent fe33c3e commit 710c135

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Source/UI/ControlPanel.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ void ControlPanel::saveStateToXml(XmlElement* xml)
983983

984984
XmlElement* controlPanelState = xml->createNewChildElement("CONTROLPANEL");
985985
controlPanelState->setAttribute("isOpen",open);
986+
controlPanelState->setAttribute("recordPath", filenameComponent->getCurrentFile().getFullPathName());
986987
controlPanelState->setAttribute("prependText",prependText->getText());
987988
controlPanelState->setAttribute("appendText",appendText->getText());
988989
controlPanelState->setAttribute("recordEngine",recordSelector->getSelectedId());
@@ -1007,7 +1008,11 @@ void ControlPanel::loadStateFromXml(XmlElement* xml)
10071008
{
10081009
if (xmlNode->hasTagName("CONTROLPANEL"))
10091010
{
1010-
1011+
String recordPath = xmlNode->getStringAttribute("recordPath", String::empty);
1012+
if (!recordPath.isEmpty())
1013+
{
1014+
filenameComponent->setCurrentFile(File(recordPath), true, sendNotificationAsync);
1015+
}
10111016
appendText->setText(xmlNode->getStringAttribute("appendText", ""), dontSendNotification);
10121017
prependText->setText(xmlNode->getStringAttribute("prependText", ""), dontSendNotification);
10131018
recordSelector->setSelectedId(xmlNode->getIntAttribute("recordEngine",1), sendNotificationSync);

0 commit comments

Comments
 (0)