From cb4c17f35f597b6670bc761ad93e5a2d54b0808a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 13 May 2013 23:04:51 +0200 Subject: If midimapfile is empty and drumkit is selected, use drumkit path as default and vice versa. --- plugingui/plugingui.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc index 5b2f2e3..9de7c94 100644 --- a/plugingui/plugingui.cc +++ b/plugingui/plugingui.cc @@ -132,7 +132,10 @@ static void kitBrowseClick(void *ptr) { PluginGUI *gui = (PluginGUI*)ptr; - fb->setPath(gui->lineedit->text()); + std::string path = gui->lineedit->text(); + if(path == "") path = gui->lineedit2->text(); + + fb->setPath(path); fb->registerFileSelectHandler(selectKitFile, gui); fb->show(); } @@ -161,7 +164,10 @@ static void midimapBrowseClick(void *ptr) { PluginGUI *gui = (PluginGUI*)ptr; - fb->setPath(gui->lineedit2->text()); + std::string path = gui->lineedit2->text(); + if(path == "") path = gui->lineedit->text(); + + fb->setPath(path); fb->registerFileSelectHandler(selectMapFile, gui); fb->show(); } -- cgit v1.2.3