1
0
Fork 0

GUI: AStyle

This commit is contained in:
mrexodia 2016-10-30 03:37:50 +01:00
parent 8db9dcdd03
commit e671200cee
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 4 additions and 4 deletions

View File

@ -353,7 +353,7 @@ void DisassemblerGraphView::paintEvent(QPaintEvent* event)
int yofs = this->verticalScrollBar()->value(); int yofs = this->verticalScrollBar()->value();
//Render background //Render background
QRect viewportRect(this->viewport()->rect().topLeft(), this->viewport()->rect().bottomRight() - QPoint(1,1)); QRect viewportRect(this->viewport()->rect().topLeft(), this->viewport()->rect().bottomRight() - QPoint(1, 1));
p.setBrush(QBrush(backgroundColor)); p.setBrush(QBrush(backgroundColor));
p.drawRect(viewportRect); p.drawRect(viewportRect);
p.setBrush(Qt::black); p.setBrush(Qt::black);
@ -370,11 +370,11 @@ void DisassemblerGraphView::paintEvent(QPaintEvent* event)
else else
paintNormal(p, viewportRect, xofs, yofs); paintNormal(p, viewportRect, xofs, yofs);
if (saveGraph) if(saveGraph)
{ {
saveGraph = false; saveGraph = false;
QString path = QFileDialog::getSaveFileName(this, tr("Save as image"), "", tr("PNG file (*.png);;JPG file (*.jpg)")); QString path = QFileDialog::getSaveFileName(this, tr("Save as image"), "", tr("PNG file (*.png);;JPG file (*.jpg)"));
if (path.isEmpty()) if(path.isEmpty())
return; return;
QImage img(this->size(), QImage::Format_ARGB32); QImage img(this->size(), QImage::Format_ARGB32);
QPainter painter(&img); QPainter painter(&img);

View File

@ -1211,7 +1211,7 @@ void MainWindow::runSelection()
if(!DbgIsDebugging()) if(!DbgIsDebugging())
return; return;
if (mGraphView->hasFocus()) if(mGraphView->hasFocus())
command = "bp " + ToPtrString(mGraphView->get_cursor_pos()) + ", ss"; command = "bp " + ToPtrString(mGraphView->get_cursor_pos()) + ", ss";
else else
command = "bp " + ToPtrString(mCpuWidget->getDisasmWidget()->getSelectedVa()) + ", ss"; command = "bp " + ToPtrString(mCpuWidget->getDisasmWidget()->getSelectedVa()) + ", ss";