GUI: find and replace, part 13
one more part coming or maybe not
This commit is contained in:
parent
74b524a912
commit
f3f8804f47
|
@ -193,8 +193,18 @@ void FurnaceGUI::doReplace() {
|
|||
doFind();
|
||||
queryViewingResults=false;
|
||||
|
||||
bool* touched[DIV_MAX_CHANS];
|
||||
memset(touched,0,DIV_MAX_CHANS*sizeof(bool*));
|
||||
|
||||
for (FurnaceGUIQueryResult& i: curQueryResults) {
|
||||
DivPattern* p=e->song.subsong[i.subsong]->pat[i.x].getPattern(e->song.subsong[i.subsong]->orders.ord[i.x][i.order],true);
|
||||
int patIndex=e->song.subsong[i.subsong]->orders.ord[i.x][i.order];
|
||||
DivPattern* p=e->song.subsong[i.subsong]->pat[i.x].getPattern(patIndex,true);
|
||||
if (touched[i.x]==NULL) {
|
||||
touched[i.x]=new bool[256*256];
|
||||
memset(touched[i.x],0,256*256*sizeof(bool));
|
||||
}
|
||||
if (touched[i.x][(patIndex<<8)|i.y]) continue;
|
||||
touched[i.x][(patIndex<<8)|i.y]=true;
|
||||
if (queryReplaceNoteDo) {
|
||||
switch (queryReplaceNoteMode) {
|
||||
case GUI_QUERY_REPLACE_SET:
|
||||
|
@ -385,6 +395,10 @@ void FurnaceGUI::doReplace() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
||||
if (touched[i]!=NULL) delete[] touched[i];
|
||||
}
|
||||
}
|
||||
|
||||
#define FIRST_VISIBLE(x) (x==GUI_QUERY_MATCH || x==GUI_QUERY_MATCH_NOT || x==GUI_QUERY_RANGE || x==GUI_QUERY_RANGE_NOT)
|
||||
|
|
Loading…
Reference in New Issue