GUI: #23 has been solved. Some stuff is now done from the instruction buffer and the mShouldReload boolean was not set to false after reloading data. Instruction can be improved with a structure that describe the buffer content...
This commit is contained in:
parent
0f7e547f74
commit
db2eb31d40
|
@ -71,6 +71,7 @@ void AbstractTableView::paintEvent(QPaintEvent* event)
|
|||
{
|
||||
prepareData();
|
||||
mPrevTableOffset = mTableOffset;
|
||||
mShouldReload = false;
|
||||
}
|
||||
|
||||
// Paints background
|
||||
|
|
|
@ -747,6 +747,22 @@ bool Disassembly::isSelected(int_t base, int_t offset)
|
|||
}
|
||||
|
||||
|
||||
bool Disassembly::isSelected(QList<Instruction_t>* buffer, int index)
|
||||
{
|
||||
if(buffer->size() > 0 && index >= 0 && index < buffer->size())
|
||||
{
|
||||
if(buffer->at(index).rva >= mSelection.fromIndex && buffer->at(index).rva <= mSelection.toIndex)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************
|
||||
Update/Reload/Refresh/Repaint
|
||||
************************************************************************************/
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
void selectNext();
|
||||
void selectPrevious();
|
||||
bool isSelected(int_t base, int_t offset);
|
||||
bool isSelected(QList<Instruction_t>* buffer, int index);
|
||||
|
||||
// Update/Reload/Refresh/Repaint
|
||||
void prepareData();
|
||||
|
|
Loading…
Reference in New Issue