Quick bug fix that was rendering debugger unusable.
Review URL: https://codereview.appspot.com/6422050 git-svn-id: http://skia.googlecode.com/svn/trunk@4668 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
3da2a0d315
commit
d3058f5fd8
@ -44,6 +44,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
|
||||
, fBreakpointsActivated(false)
|
||||
, fDeletesActivated(false)
|
||||
, fPause(false)
|
||||
, fLoading(false)
|
||||
{
|
||||
setupUi(this);
|
||||
connect(&fListWidget, SIGNAL(currentItemChanged(QListWidgetItem*,
|
||||
@ -90,7 +91,11 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
|
||||
connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()));
|
||||
|
||||
fInspectorWidget.setDisabled(true);
|
||||
fMenuBar.setDisabled(true);
|
||||
//fMenuBar.setDisabled(true);
|
||||
fMenuEdit.setDisabled(true);
|
||||
fMenuNavigate.setDisabled(true);
|
||||
fMenuView.setDisabled(true);
|
||||
|
||||
}
|
||||
|
||||
SkDebuggerGUI::~SkDebuggerGUI() {
|
||||
@ -257,6 +262,7 @@ void SkDebuggerGUI::pauseDrawing(bool isPaused) {
|
||||
}
|
||||
|
||||
void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
|
||||
if(!fLoading) {
|
||||
int currentRow = fListWidget.currentRow();
|
||||
if (!fPause) {
|
||||
fCanvasWidget.drawTo(currentRow);
|
||||
@ -281,6 +287,7 @@ void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
|
||||
fInspectorWidget.setClip(fCanvasWidget.getCurrentClip());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SkDebuggerGUI::selectCommand(int command) {
|
||||
if (fPause) {
|
||||
@ -528,7 +535,9 @@ void SkDebuggerGUI::setupDirectoryWidget() {
|
||||
}
|
||||
|
||||
void SkDebuggerGUI::loadPicture(QString fileName) {
|
||||
fLoading = true;
|
||||
fCanvasWidget.loadPicture(fileName);
|
||||
std::string cocks = fileName.toStdString();
|
||||
std::vector<std::string> *cv = fCanvasWidget.getDrawCommands();
|
||||
/* fDebugCanvas is reinitialized every load picture. Need it to retain value
|
||||
* of the visibility filter. */
|
||||
@ -538,7 +547,11 @@ void SkDebuggerGUI::loadPicture(QString fileName) {
|
||||
setupComboBox(cv);
|
||||
fInspectorWidget.setDisabled(false);
|
||||
fSettingsWidget.setDisabled(false);
|
||||
fMenuBar.setDisabled(false);
|
||||
fMenuEdit.setDisabled(false);
|
||||
fMenuNavigate.setDisabled(false);
|
||||
fMenuView.setDisabled(false);
|
||||
fLoading = false;
|
||||
actionPlay();
|
||||
}
|
||||
|
||||
void SkDebuggerGUI::setupListWidget(std::vector<std::string>* cv) {
|
||||
|
@ -222,6 +222,7 @@ private:
|
||||
bool fDeletesActivated;
|
||||
bool fPause;
|
||||
int fPausedRow;
|
||||
bool fLoading;
|
||||
|
||||
/**
|
||||
Creates the entire UI.
|
||||
|
@ -51,8 +51,8 @@
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries' : [
|
||||
'/usr/lib/libQtCore.so',
|
||||
'/usr/lib/libQtGui.so',
|
||||
'-lQtCore',
|
||||
'-lQtGui',
|
||||
],
|
||||
},
|
||||
}],
|
||||
|
Loading…
Reference in New Issue
Block a user