GUI: fixed a performance problem in the memory map + fixed a crash in the Configuration
This commit is contained in:
parent
726bd25210
commit
e1bd4a288c
|
|
@ -199,9 +199,8 @@ QString MemoryMapView::paintContent(QPainter* painter, int_t rowBase, int rowOff
|
|||
}
|
||||
else if(col == 4) //CPROT
|
||||
{
|
||||
duint setting = 0;
|
||||
QString wStr = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h);;
|
||||
if(BridgeSettingGetUint("Engine", "ListAllPages", &setting) && !setting)
|
||||
if(!ConfigBool("Engine", "ListAllPages"))
|
||||
{
|
||||
painter->setPen(ConfigColor("MemoryMapSectionTextColor"));
|
||||
painter->drawText(QRect(x + 4, y, getColumnWidth(col) - 4, getRowHeight()), Qt::AlignVCenter | Qt::AlignLeft, wStr);
|
||||
|
|
@ -393,11 +392,8 @@ void MemoryMapView::pageMemoryRights()
|
|||
|
||||
void MemoryMapView::switchView()
|
||||
{
|
||||
duint setting = 0;
|
||||
if(BridgeSettingGetUint("Engine", "ListAllPages", &setting) && setting)
|
||||
BridgeSettingSetUint("Engine", "ListAllPages", 0);
|
||||
else
|
||||
BridgeSettingSetUint("Engine", "ListAllPages", 1);
|
||||
Config()->setBool("Engine", "ListAllPages", !ConfigBool("Engine", "ListAllPages"));
|
||||
Config()->writeBools();
|
||||
DbgSettingsUpdated();
|
||||
DbgFunctions()->MemUpdateMap();
|
||||
setSingleSelection(0);
|
||||
|
|
|
|||
|
|
@ -162,6 +162,10 @@ Configuration::Configuration() : QObject()
|
|||
disassemblyBool.insert("TabbedMnemonic", false);
|
||||
defaultBools.insert("Disassembler", disassemblyBool);
|
||||
|
||||
QMap<QString, bool> engineBool;
|
||||
engineBool.insert("ListAllPages", false);
|
||||
defaultBools.insert("Engine", engineBool);
|
||||
|
||||
//uint settings
|
||||
QMap<QString, uint_t> hexdumpUint;
|
||||
hexdumpUint.insert("DefaultView", 0);
|
||||
|
|
@ -372,7 +376,7 @@ void Configuration::readUints()
|
|||
{
|
||||
Uints = defaultUints;
|
||||
//read config
|
||||
for(int i = 0; i < Bools.size(); i++)
|
||||
for(int i = 0; i < Uints.size(); i++)
|
||||
{
|
||||
QString category = Uints.keys().at(i);
|
||||
QMap<QString, uint_t>* currentUint = &Uints[category];
|
||||
|
|
@ -387,7 +391,7 @@ void Configuration::readUints()
|
|||
void Configuration::writeUints()
|
||||
{
|
||||
//write config
|
||||
for(int i = 0; i < Bools.size(); i++)
|
||||
for(int i = 0; i < Uints.size(); i++)
|
||||
{
|
||||
QString category = Uints.keys().at(i);
|
||||
QMap<QString, uint_t>* currentUint = &Uints[category];
|
||||
|
|
|
|||
Loading…
Reference in New Issue