From 5b4b2178dfdc7c91a59c3bc5c60e61e48aae0492 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Tue, 23 Sep 2014 20:52:44 +0200 Subject: Saving lastkit and lastmidimap instantly when file is selected from filebrowser. --- plugingui/plugingui.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'plugingui') diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc index b235af3..f345660 100644 --- a/plugingui/plugingui.cc +++ b/plugingui/plugingui.cc @@ -94,11 +94,13 @@ static void selectKitFile(void *ptr, std::string filename) PluginGUI *gui = (PluginGUI*)ptr; gui->lineedit->setText(filename); + fb->hide(); std::string drumkit = gui->lineedit->text(); gui->config->lastkit = drumkit; + gui->config->save(); gui->progress->setProgress(0); gui->progress->setState(GUI::ProgressBar::blue); @@ -132,6 +134,7 @@ static void selectMapFile(void *ptr, std::string filename) std::string midimap = gui->lineedit2->text(); gui->config->lastmidimap = midimap; + gui->config->save(); LoadMidimapMessage *msg = new LoadMidimapMessage(); msg->midimapfile = midimap; @@ -334,7 +337,8 @@ void PluginGUI::init() lineedit = new GUI::LineEdit(window); lineedit->move(XOFFSET, y); lineedit->resize(243, 29); - + lineedit->setReadOnly(true); + GUI::Button *btn_brw = new GUI::Button(window); btn_brw->setText("Browse..."); btn_brw->move(266, y - 6 + 4); @@ -364,7 +368,8 @@ void PluginGUI::init() lineedit2 = new GUI::LineEdit(window); lineedit2->move(XOFFSET, y); lineedit2->resize(243, 29); - + lineedit2->setReadOnly(true); + GUI::Button *btn_brw = new GUI::Button(window); btn_brw->setText("Browse..."); btn_brw->move(266, y - 6 + 4); -- cgit v1.2.3