Changed not synced to unsynced (#911)

This commit is contained in:
xarkes 2018-11-08 23:20:49 +01:00 committed by GitHub
parent 5302bf6420
commit a92fc9b83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,8 @@
#include "MainWindow.h"
#include "CutterSeekableWidget.h"
const QString CutterSeekableWidget::UNSYNCED_TEXT = tr(" (unsynced)");
CutterSeekableWidget::CutterSeekableWidget(QObject *parent)
:
QObject(parent)

View File

@ -6,7 +6,6 @@ class MainWindow;
class CutterSeekableWidget : public QObject
{
Q_OBJECT
public:
@ -21,6 +20,8 @@ public:
void setIndependentOffset(RVA addr);
void onSeekChanged(RVA addr);
static const QString UNSYNCED_TEXT;
private:
RVA independentOffset = RVA_INVALID;
RVA prevIdenpendentOffset = RVA_INVALID;
@ -29,4 +30,4 @@ private:
signals:
void seekChanged(RVA addr);
};
};

View File

@ -144,7 +144,7 @@ void DisassemblerGraphView::toggleSync()
if (seekable->getSyncWithCore()) {
parentWidget()->setWindowTitle(windowTitle);
} else {
parentWidget()->setWindowTitle(windowTitle + " (not synced)");
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
seekable->setIndependentOffset(Core()->getOffset());
}
}
@ -210,7 +210,7 @@ void DisassemblerGraphView::loadCurrentGraph()
windowTitle += " (" + funcName + ")";
}
if (!seekable->getSyncWithCore()) {
parentWidget()->setWindowTitle(windowTitle + " (not synced)");
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
} else {
parentWidget()->setWindowTitle(windowTitle);
}

View File

@ -184,7 +184,7 @@ void DisassemblyWidget::toggleSync()
if (seekable->getSyncWithCore()) {
setWindowTitle(windowTitle);
} else {
setWindowTitle(windowTitle + " (not synced)");
setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
seekable->setIndependentOffset(Core()->getOffset());
}
}

View File

@ -643,7 +643,7 @@ void HexdumpWidget::toggleSync()
if (seekable->getSyncWithCore()) {
setWindowTitle(windowTitle);
} else {
setWindowTitle(windowTitle + " (not synced)");
setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
seekable->setIndependentOffset(Core()->getOffset());
}
}