Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO][BUGFIX] Fixing the music selection map property.


emblem
 Share

Recommended Posts

There's two problems with the original code.
The first one is that it sometimes switches directories, the second one is that the value is not restored properly.

This code change fixes both of those:

**In frmEditor_MapProperties, in sub Form_Load replace this.**

**Before:**
```
' find the music we have set
    If fMusic.ListIndex >= 0 Then
        fMusic.ListIndex = 0
        For i = 1 To fMusic.ListIndex
            If fMusic.List(i) = Trim$(Map.Music) Then
                fMusic.ListIndex = i
            End If
        Next
    End If

```
**After:**
```
' find the music we have set
    fMusic.Path = App.Path & MUSIC_PATH
    fMusic.ListIndex = -1
    For i = 1 To fMusic.ListCount - 1
        If fMusic.List(i) = Trim$(Map.Music) Then
            fMusic.ListIndex = i
        End If
    Next

```
Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...