Skip to content

Commit

Permalink
fixed bug with guis for for example layer indication remaining on scr…
Browse files Browse the repository at this point in the history
…een when changing/modifying profiles
  • Loading branch information
Osterie committed Mar 28, 2024
1 parent dc923e1 commit 1a0ccfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Main/Lib/Actions/LayerControlling/LayerController.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Class LayerController extends Action{
this.layers.InsertAt(layer, layerIndicatorInstance)
}

destroyLayerIndicator(layer){
this.layers[layer].Destroy()
}

showLayerIndicator(layer){
this.activeLayer := layer
this.layers[layer].Show()
Expand Down Expand Up @@ -80,4 +84,10 @@ Class LayerController extends Action{
setActiveLayer(activeLayer){
this.activeLayer := activeLayer
}

Destroy(){
loop this.layers.Length{
this.destroyLayerIndicator(A_Index)
}
}
}
2 changes: 1 addition & 1 deletion src/Main/Main.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ Class Main{
Start(){
try{
if (this.scriptRunning){
; TODO destroy guis..
this.DestroyObjectRegistry()
this.SetHotkeysForAllLayers(false)
this.StartupConfigurator := ""
this.ObjectRegister := ObjectRegistry()
; TODO probably needs to be destroyed...
this.KeyboardLayersInfoRegister := KeyboardLayersInfoRegistry()
}
this.RunLogicalStartup()
Expand Down

0 comments on commit 1a0ccfe

Please sign in to comment.