Skip to content

Commit f74e2e4

Browse files
committed
Formatting
1 parent cd11809 commit f74e2e4

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

NeuralAmpModeler/NeuralAmpModeler.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
223223
}
224224
};
225225

226+
pGraphics->AttachControl(new NAMFileBrowserControl(modelArea, kMsgTagClearModel, "Select model directory...", "nam",
227+
loadModelCompletionHandler, style, fileSVG, closeButtonSVG,
228+
leftArrowSVG, rightArrowSVG),
229+
kCtrlTagModelFileBrowser);
226230
pGraphics->AttachControl(
227-
new NAMFileBrowserControl(modelArea, kMsgTagClearModel, "Select model directory...", "nam", loadModelCompletionHandler,
228-
style, fileSVG, closeButtonSVG, leftArrowSVG, rightArrowSVG),
229-
kCtrlTagModelFileBrowser);
230-
pGraphics->AttachControl(
231-
new NAMFileBrowserControl(irArea, kMsgTagClearIR, "Select IR directory...", "wav", loadIRCompletionHandler, style, fileSVG,
232-
closeButtonSVG, leftArrowSVG, rightArrowSVG),
231+
new NAMFileBrowserControl(irArea, kMsgTagClearIR, "Select IR directory...", "wav", loadIRCompletionHandler, style,
232+
fileSVG, closeButtonSVG, leftArrowSVG, rightArrowSVG),
233233
kCtrlTagIRFileBrowser);
234234

235235
// TODO all these magic numbers

NeuralAmpModeler/NeuralAmpModelerControls.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,16 @@ class NAMFileBrowserControl : public IDirBrowseControlBase
203203
WDL_String fileName;
204204
WDL_String path;
205205
GetSelectedFileDirectory(path);
206-
pCaller->GetUI()->PromptForDirectory(
207-
path, [&](const WDL_String& fileName, const WDL_String& path) {
208-
if (path.GetLength())
209-
{
210-
ClearPathList();
211-
AddPath(path.Get(), "");
212-
SetupMenu();
213-
SelectFirstFile();
214-
LoadFileAtCurrentIndex();
215-
}
216-
});
206+
pCaller->GetUI()->PromptForDirectory(path, [&](const WDL_String& fileName, const WDL_String& path) {
207+
if (path.GetLength())
208+
{
209+
ClearPathList();
210+
AddPath(path.Get(), "");
211+
SetupMenu();
212+
SelectFirstFile();
213+
LoadFileAtCurrentIndex();
214+
}
215+
});
217216
};
218217

219218
auto clearFileFunc = [&](IControl* pCaller) {
@@ -299,17 +298,15 @@ class NAMFileBrowserControl : public IDirBrowseControlBase
299298
}
300299

301300
private:
302-
void SelectFirstFile()
301+
void SelectFirstFile() { mSelectedIndex = mFiles.GetSize() ? 0 : -1; }
302+
303+
void GetSelectedFileDirectory(WDL_String& path)
303304
{
304-
mSelectedIndex = mFiles.GetSize() ? 0 : -1;
305-
}
306-
307-
void GetSelectedFileDirectory(WDL_String& path) {
308305
GetSelectedFile(path);
309306
path.remove_filepart();
310307
return;
311308
}
312-
309+
313310
WDL_String mDefaultLabelStr;
314311
IFileDialogCompletionHandlerFunc mCompletionHandlerFunc;
315312
NAMFileNameControl* mFileNameControl = nullptr;

0 commit comments

Comments
 (0)