summaryrefslogtreecommitdiff
path: root/plugingui/plugingui.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-05-13 23:04:51 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-05-13 23:04:51 +0200
commitcb4c17f35f597b6670bc761ad93e5a2d54b0808a (patch)
tree01163e3ed71aef4d5015de2e1b1266585e522c75 /plugingui/plugingui.cc
parent98920ea806e9914bb4085cb80748eed0c5ffc8fa (diff)
If midimapfile is empty and drumkit is selected, use drumkit path as default and vice versa.
Diffstat (limited to 'plugingui/plugingui.cc')
-rw-r--r--plugingui/plugingui.cc10
1 files 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();
}