diff --git a/src/html/graph/lib/js/disasm.js b/src/html/graph/lib/js/disasm.js
index 037cbce4..5f023714 100644
--- a/src/html/graph/lib/js/disasm.js
+++ b/src/html/graph/lib/js/disasm.js
@@ -199,29 +199,29 @@ BBGraph.prototype.render = function() {
}
});
- if (r2ui.graph_panel.minimap) {
- update_minimap();
- $("#minimap_area").draggable({
- containment: "parent",
- stop: function( event, ui ) {
- var delta_x = ui.position.left/scale;
- var delta_y = ui.position.top/scale;
- if (delta_x < 0) delta_x = 0;
- if (delta_y < 0) delta_y = 0;
- if ($("#radareApp_mp").length) {
- //$("#main_panel").scrollTo({ top:delta_y, left:delta_x - delta/scale } );
- console.log(1);
- } else {
- //$('#center_panel').scrollTo({ top:delta_y, left:delta_x - delta/scale } );
- console.log('debug:');
- console.log(delta_y, delta_x, scale);
- console.log($('#center_panel'));
- }
- }
- });
- } else {
- $("#minimap").hide();
- }
+ // if (r2ui.graph_panel.minimap) {
+ // update_minimap();
+ // $("#minimap_area").draggable({
+ // containment: "parent",
+ // stop: function( event, ui ) {
+ // var delta_x = ui.position.left/scale;
+ // var delta_y = ui.position.top/scale;
+ // if (delta_x < 0) delta_x = 0;
+ // if (delta_y < 0) delta_y = 0;
+ // if ($("#radareApp_mp").length) {
+ // //$("#main_panel").scrollTo({ top:delta_y, left:delta_x - delta/scale } );
+ // console.log(1);
+ // } else {
+ // //$('#center_panel').scrollTo({ top:delta_y, left:delta_x - delta/scale } );
+ // console.log('debug:');
+ // console.log(delta_y, delta_x, scale);
+ // console.log($('#center_panel'));
+ // }
+ // }
+ // });
+ // } else {
+ // $("#minimap").hide();
+ // }
};
@@ -585,7 +585,7 @@ function html_for_instruction(ins) {
if (info !== null && info !== undefined && info.length > 0)
idump += '
(fcn) ' + info[0].name + '
';
} catch (err) {
- console.log("Error getting instruction information from afij command");
+ console.log("Error getting instruction information from afij command: " + err);
}
// Get function variables
diff --git a/src/widgets/memorywidget.cpp b/src/widgets/memorywidget.cpp
index a8b3352d..a1c0ba25 100644
--- a/src/widgets/memorywidget.cpp
+++ b/src/widgets/memorywidget.cpp
@@ -16,6 +16,7 @@
#include
#include
#include
+#include
MemoryWidget::MemoryWidget(MainWindow *main) :
QDockWidget(main),
@@ -1509,18 +1510,22 @@ void MemoryWidget::fillOffsetInfo(QString off)
void MemoryWidget::create_graph(QString off)
{
+ // No Cache enabled in 5.7
+ // ui->graphWebView->page()->profile()->setHttpCacheType(QWebEngineProfile::NoCache);
+ // force reload by first loading a blank page
+ // this is a workaround since it shows a white glitch
+ ui->graphWebView->setUrl(QUrl("about:blank"));
+
ui->graphWebView->setZoomFactor(0.85);
- //this->main->add_debug_output("Graph Offset: '" + off + "'");
+ this->main->add_debug_output("Graph Offset: '" + off + "'");
if (off == "")
{
off = "0x0" + this->main->core->cmd("s").split("0x")[1].trimmed();
}
- QString fcn = this->main->core->cmdFunctionAt(off);
-
+ //QString fcn = this->main->core->cmdFunctionAt(off);
//this->main->add_debug_output("Graph Fcn: " + fcn);
ui->graphWebView->setUrl(QUrl("qrc:/graph/html/graph/index.html#" + off));
QString port = this->main->core->config("http.port");
-
ui->graphWebView->page()->runJavaScript(QString("r2.root=\"http://localhost:%1\"").arg(port));
}
@@ -1875,11 +1880,14 @@ void MemoryWidget::switchTheme(bool dark)
if (dark)
{
ui->webSimpleGraph->page()->setBackgroundColor(QColor(64, 64, 64));
+ ui->graphWebView->page()->runJavaScript("r2ui.graph_panel.render('dark');");
}
else
{
ui->webSimpleGraph->page()->setBackgroundColor(QColor(255, 255, 255));
+ ui->graphWebView->page()->runJavaScript("r2ui.graph_panel.render('light');");
}
+ //ui->graphWebView->reload();
}
void MemoryWidget::on_opcodeDescButton_clicked()