diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-05-13 23:04:51 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-05-13 23:04:51 +0200 |
commit | cb4c17f35f597b6670bc761ad93e5a2d54b0808a (patch) | |
tree | 01163e3ed71aef4d5015de2e1b1266585e522c75 /plugingui | |
parent | 98920ea806e9914bb4085cb80748eed0c5ffc8fa (diff) |
If midimapfile is empty and drumkit is selected, use drumkit path as default and vice versa.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/plugingui.cc | 10 |
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(); } |