Skip to content

Commit

Permalink
Bug fix: open search form on load project if user variable is true
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarfuste committed Oct 21, 2020
1 parent 31f78e0 commit 2f64ca6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions actions/api_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ def init_dialog(self):
self.dlg_search.dlg_closed.connect(self.close_search)


def api_search(self, dlg_mincut=None):
def api_search(self, dlg_mincut=None, load_project=False):

# If search is open, dont let user open another one
open_search = self.controller.get_user_setting_value('open_search', 'false')
if open_search in ("True", "true", True) and dlg_mincut is None:
if open_search in ("True", "true", True) and dlg_mincut is None and load_project is False:
return

form = ""
if self.dlg_search is None and dlg_mincut is None:
self.init_dialog()
Expand Down
2 changes: 1 addition & 1 deletion actions/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ def basic_api_search(self):
if self.api_search is None:
self.api_search = ApiSearch(self.iface, self.settings, self.controller, self.plugin_dir)

self.api_search.api_search()
self.api_search.api_search(load_project=True)

0 comments on commit 2f64ca6

Please sign in to comment.