Skip to content

Commit

Permalink
Fixed a small bug in patch-map[] when skip-size is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
GarryMorrison committed Feb 13, 2022
1 parent 9eb3454 commit 5f25c81
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/GUI/Interface/EditPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void EditPanel::OnPageClose(wxCommandEvent& event)
wxFileDialog saveFileDialog(this, "Save sw file", "", current_tab, "sw file (*.sw;*.swc;*.sw3;*.sw4;*.swe)|*.sw;*.swc;*.sw3;*.sw4;*.swe|Text file (*.txt)|*.txt", wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (saveFileDialog.ShowModal() == wxID_CANCEL)
{
return;
return; // Maybe we want it to keep the tab open in this branch??
}
SaveFile(saveFileDialog.GetPath());
}
Expand Down
2 changes: 1 addition & 1 deletion src/OperatorLibrary/OperatorLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2606,7 +2606,7 @@ Ket op_patch_map(const Sequence& input_seq, ContextList& context, const std::vec
{
// std::cout << "x: " << x << " y: " << y << "\n";
// if (skip_index % skip_size == 0) // Skip based on total number of patches.
if (x % skip_size == 0) // Skip based on x position. Not yet sure which we want.
if (x % skip_size == 0 && y % skip_size == 0) // Skip based on x and y position. Not yet sure which we want.
{
Sequence patch;
for (int y2 = 0; y2 < output_height; y2++)
Expand Down
4 changes: 1 addition & 3 deletions src/OperatorUsageMap/OperatorUsageMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4501,11 +4501,9 @@ OperatorUsageMap::OperatorUsageMap() {
" patch-map[4, 2, 2, 2, sprint] the |seq>\n"
" |0> . |1> . |4> . |5>\n"
" |2> . |3> . |6> . |7>\n"
" |4> . |5> . |8> . |9>\n"
" |6> . |7> . |10> . |11>\n"
" |8> . |9> . |12> . |13>\n"
" |10> . |11> . |14> . |15>\n"
" 6|patches>\n\n"
" 4|patches>\n\n"
" see also:\n"
" display-patch, sprint\n";

Expand Down

0 comments on commit 5f25c81

Please sign in to comment.