Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Commit

Permalink
Don't limit double clicking to the selected preset; people might want…
Browse files Browse the repository at this point in the history
… to place a preset while editing, and it's not inherently unsafe to do that.
  • Loading branch information
PunishedPineapple committed Jul 27, 2022
1 parent 6fd613d commit 7c118e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WaymarkPresetPlugin/UI/Window_Library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ unsafe private (int,int,bool)? DrawPresetsForZone( KeyValuePair<UInt16, List<int
}

// Place preset when its entry in the library window is double clicked.
if( SelectedPreset >= 0 && ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked( ImGuiMouseButton.Left ) )
if( ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked( ImGuiMouseButton.Left ) )
{
var preset = mConfiguration.PresetLibrary.Presets[SelectedPreset].GetAsGamePreset();
var preset = mConfiguration.PresetLibrary.Presets[indices[i]].GetAsGamePreset();

MemoryHandler.PlacePreset( preset );
}
Expand Down Expand Up @@ -404,9 +404,9 @@ unsafe private (int,int,bool)? DrawUncategorizedPresets()
}

// Place preset when its entry in the library window is double clicked.
if( SelectedPreset >= 0 && ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked( ImGuiMouseButton.Left ) )
if( ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked( ImGuiMouseButton.Left ) )
{
var preset = mConfiguration.PresetLibrary.Presets[SelectedPreset].GetAsGamePreset();
var preset = mConfiguration.PresetLibrary.Presets[i].GetAsGamePreset();

MemoryHandler.PlacePreset( preset );
}
Expand Down

0 comments on commit 7c118e9

Please sign in to comment.