Skip to content

Commit

Permalink
fix: fix binding list menu box selection not being remembered
Browse files Browse the repository at this point in the history
  • Loading branch information
gwatcha committed Aug 20, 2020
1 parent db13a2a commit cc69be6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions internal/gui/binding_list/View.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function createBindingListWindow(props)
name = "context_filter",
type = "Menubox",
frame = false,
retval = element_values.context_filter,
retval = element_values.context_i,
textFont = "binding_list_label",
captionFont = "binding_list_label",
labelFont = "binding_list_label",
Expand All @@ -165,7 +165,7 @@ function createBindingListWindow(props)
{
name = "action_type_filter",
type = "Menubox",
retval = element_values.action_type_filter,
retval = element_values.action_type_i,
frame = false,
textFont = "binding_list_label",
captionFont = "binding_list_label",
Expand Down Expand Up @@ -203,7 +203,7 @@ function View:new(props)

self.window = createBindingListWindow(props)

self.selected_i = 1
self.selected_i = 0
self.action_executed = false

local query = GUI.findElementByName("query")
Expand Down Expand Up @@ -239,6 +239,7 @@ function View:new(props)
self:updateElementDimensions()
self:redraw()


return binding_list
end

Expand Down
4 changes: 2 additions & 2 deletions internal/gui/binding_list/controller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function rowIsFiltered(row, element_values)
end

function getElementValues(view)
local context_filter_i, context = view.elements.context_filter:val()
local context_i, context = view.elements.context_filter:val()
local action_type_i, action_type = view.elements.action_type_filter:val()
return {
binding_list_box = view.elements.binding_list_box:val(),
Expand All @@ -69,7 +69,7 @@ function getElementValues(view)
context_i = context_i,
action_type_filter_active = view.elements.action_type_filter_active:val(nil, true),
action_type = action_type,
action_i = action_type_i,
action_type_i = action_type_i,
query = view.elements.query:val(),
}
end
Expand Down

0 comments on commit cc69be6

Please sign in to comment.