possibly solve vZoom/vScroll issue

move these to a new DivInstrumentTemp struct
this way, undo history is not altered every time these change

issue #2179
This commit is contained in:
tildearrow 2025-03-10 12:35:05 -05:00
parent b7a8745581
commit b46a60e96d
4 changed files with 82 additions and 111 deletions

View file

@ -52,8 +52,8 @@
#define RESET_WAVE_MACRO_ZOOM \
for (DivInstrument* _wi: e->song.ins) { \
_wi->std.waveMacro.vZoom=-1; \
_wi->std.waveMacro.vScroll=-1; \
_wi->temp.vZoom[DIV_MACRO_WAVE]=-1; \
_wi->temp.vScroll[DIV_MACRO_WAVE]=-1; \
}
#define CHECK_LONG_HOLD (mobileUI && ImGui::GetIO().MouseDown[ImGuiMouseButton_Left] && ImGui::GetIO().MouseDownDuration[ImGuiMouseButton_Left]>=longThreshold && ImGui::GetIO().MouseDownDurationPrev[ImGuiMouseButton_Left]<longThreshold && ImGui::GetIO().MouseDragMaxDistanceSqr[ImGuiMouseButton_Left]<=ImGui::GetIO().ConfigInertialScrollToleranceSqr)
@ -1362,6 +1362,7 @@ struct FurnaceGUISysCategory {
};
struct FurnaceGUIMacroDesc {
DivInstrument* ins;
DivInstrumentMacro* macro;
int min, max;
float height;
@ -1376,6 +1377,7 @@ struct FurnaceGUIMacroDesc {
bool isPitch;
FurnaceGUIMacroDesc(const char* name, DivInstrumentMacro* m, int macroMin, int macroMax, float macroHeight, ImVec4 col=ImVec4(1.0f,1.0f,1.0f,1.0f), bool block=false, const char* mName=NULL, String (*hf)(int,float,void*)=NULL, bool bitfield=false, const char** bfVal=NULL, bool bit30Special=false, void* hfu=NULL, bool isArp=false, bool isPitch=false):
ins(NULL),
macro(m),
height(macroHeight),
displayName(name),