PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Gem selection not always reverting to original value when pressing escape

Offen
#4,785 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
Lua
Sterne
5.4k
Forks
2.4k
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
26

Beschreibung

Check version
  • I'm running the latest version of Path of Building and I've verified this by checking the changelog
Check for duplicates
  • I've checked for duplicate issues by using the search function of the issue tracker
What is the expected behaviour/value?

When pressing escape on an expanded selection box in the skill selection, the selection should go back to the original selection from when the box was expanded.

This seem to be related to that the functionality of escape is based on selection index and text in the gem name box. Which can be affected by filtering, and doesnt take into account the boxes level/variant:

GemSelectControl.lua:652:
function GemSelectClass:OnFocusGained() ... self.initialBuf = self.buf self.initialIndex = self.selIndex

GemSelectControl.lua:710
elseif key == "ESCAPE" then self.dropped = false self:BuildList("") self.buf = self.initialBuf self.selIndex = self.initialIndex self:UpdateGem(false,true) return

What is the actual behaviour/value?

The following examples are gifs below:
When filtering out the active skill, selecting that skill and pressing escape, the skill changes to something allowed by the filter

When not filtering, there is still an issue with levels and variant reverted to defaults based on what has been marked when moving up and down the list before escaping:

How to reproduce the issue

As discussed in #863.
Do the following steps:

  • Choose a non-awakened skill (for instance brutality)
  • set show support gems to "awakened"
  • expand the brutality selection box,
  • Press escape

And the second example

  • Chose a skill (for instance brutality)
  • set the level to 7
  • expand the selection list
  • move up and down through the list (and see that level and variant changes)
  • press escape and see that the changes have stuck
Character build code
https://pobb.in/ijj1-ZwhHsWD
Screenshots

Brutality

BrutalitylevelVariant

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne in GemSelectControl.lua bei der Behandlung von OnFocusGained und ESCAPE in der Nähe der Zeilen 652 und 710. Reproduziere sowohl die Filter- als auch die Level-/Variantenfälle aus dem Issue und überprüfe anschließend, dass das Drücken von Escape die ursprüngliche Skill-Auswahl, das Level und die Variante wiederherstellt; verwende die verknüpften Beispiele und den Build-Code als Referenz.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
lua
Bereich
desktop
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.