From: Jean-Paul Mari Date: Mon, 22 Apr 2019 21:53:51 +0000 (-0400) Subject: Removed the sorting filter in the all watches window X-Git-Tag: v2.1.3-R4~4 X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/commitdiff_plain/8d705db0c293e54151f747bd6efaa977b3cab147 Removed the sorting filter in the all watches window --- diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index de608d4..93a7cc9 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -74,8 +74,7 @@ Git commit: TBD -- Used mostly to allow display the source assembled with vasm 39) Added function name support from ELF structure 40) Added the return address information in the call stack -41) Added multiple breakpoints feature and their key bindings --- For functions only +41) Added multiple breakpoints feature, and their key bindings, for functions only 42) Added timer initialisation for the SDL setup 43) Added a cartdridge view menu -- Added a window to display my own directory and his files list @@ -87,6 +86,7 @@ Git commit: TBD 49) Added a Save Dump As... feature to save a memory zone to a file 50) The -d command line option, dedicated to the debugger, has been renamed to avoid duplication with the dsp one -- -d has been renamed by -D because another -d was also used for the dsp command line option +51) Removed the sorting filter in the all watches window Release 3 (13th November 2017) ------------------------------ diff --git a/src/debugger/allwatchbrowser.cpp b/src/debugger/allwatchbrowser.cpp index 54a8126..f17b3f4 100644 --- a/src/debugger/allwatchbrowser.cpp +++ b/src/debugger/allwatchbrowser.cpp @@ -9,16 +9,18 @@ // --- ---------- ----------------------------------------------------------- // JPM 12/07/2017 Created this file // JPM 09/14/2018 Added a status bar, better status report and set information values in a tab -// JPM 10/05/2018 Added a sorting filter +// JPM April/2019 Added a sorting filter, tableview unique rows creation // // STILL TO DO: // Better presentation // To set the information display at the right +// To understand/fix the problem with the sorting filter // Display arrays information // Display structures information // +//#define AW_SORTINGFILTER // Authorise the sorting filtes //#define AW_DEBUGNUMVARIABLE 4415 // Set the global variable number to debug #ifndef AW_DEBUGNUMVARIABLE #define AW_STARTNUMVARIABLE 0 // Must be kept to 0 in case of no debug is required @@ -112,7 +114,12 @@ void AllWatchBrowserWindow::RefreshContents(void) if (NbWatch = DBGManager_GetNbGlobalVariables()) { PtrWatchInfo = (WatchInfo *)calloc(NbWatch, sizeof(WatchInfo)); - +#ifndef AW_LAYOUTTEXTS +#ifdef AW_SORTINGFILTER + TableView->setSortingEnabled(false); +#endif + model->setRowCount(0); +#endif for (uint32_t i = AW_STARTNUMVARIABLE; i < NbWatch; i++) { PtrWatchInfo[i].PtrVariableName = DBGManager_GetGlobalVariableName(i + 1); @@ -125,14 +132,12 @@ void AllWatchBrowserWindow::RefreshContents(void) } #else PtrWatchInfo[i].PtrVariableBaseTypeName = DBGManager_GetGlobalVariableTypeName(i + 1); + model->insertRow(i); #endif } } } -#ifndef AW_LAYOUTTEXTS - TableView->setSortingEnabled(false); - model->setRowCount(0); -#endif + if (NbWatch) { for (uint32_t i = AW_STARTNUMVARIABLE; i < NbWatch; i++) @@ -158,7 +163,6 @@ void AllWatchBrowserWindow::RefreshContents(void) sprintf(string, "%i : %s | %s | 0x%06X | %s", (i + 1), PtrWatchInfo[i].PtrVariableBaseTypeName, PtrWatchInfo[i].PtrVariableName, (unsigned int)PtrWatchInfo[i].addr, PtrValue ? PtrValue : (char *)"N/A"); WatchAll += QString(string); #else - model->insertRow(i); model->setItem(i, 0, new QStandardItem(QString("%1").arg(PtrWatchInfo[i].PtrVariableName))); model->setItem(i, 1, new QStandardItem(QString("%1").arg(PtrValue))); model->setItem(i, 2, new QStandardItem(QString("%1").arg(PtrWatchInfo[i].PtrVariableBaseTypeName))); @@ -168,7 +172,9 @@ void AllWatchBrowserWindow::RefreshContents(void) text->clear(); text->setText(WatchAll); #else +#ifdef AW_SORTINGFILTER TableView->setSortingEnabled(true); +#endif #endif sprintf(msg, "Ready"); }