don't print error if a building is not selected

develop
Myk Taylor 2023-07-05 19:06:57 -07:00
parent 8e7d7fefc0
commit 0b9f84a5da
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 2 additions and 2 deletions

@ -124,7 +124,7 @@ local function mouse_is_over_resume_button(rect)
end
function InspectorOverlay:onInput(keys)
if not require('plugins.buildingplan').isPlannedBuilding(dfhack.gui.getSelectedBuilding()) then
if not require('plugins.buildingplan').isPlannedBuilding(dfhack.gui.getSelectedBuilding(true)) then
return false
end
if keys._MOUSE_L_DOWN and mouse_is_over_resume_button(self.frame_parent_rect) then
@ -136,7 +136,7 @@ function InspectorOverlay:onInput(keys)
end
function InspectorOverlay:render(dc)
if not require('plugins.buildingplan').isPlannedBuilding(dfhack.gui.getSelectedBuilding()) then
if not require('plugins.buildingplan').isPlannedBuilding(dfhack.gui.getSelectedBuilding(true)) then
return
end
if reset_inspector_flag then