diff options
author | Lectem <lectem@gmail.com> | 2015-07-26 15:03:54 +0200 |
---|---|---|
committer | Lectem <lectem@gmail.com> | 2015-07-26 16:23:28 +0200 |
commit | b335cce22ee803a1a467425a0cc689e2afbaf878 (patch) | |
tree | 841a42d5ab0603cf3bb5a9ef53391e8fc0ceb3dd /src/citra_qt/debugger | |
parent | citra-qt/command list: Add mask column (diff) | |
download | yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar.gz yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar.bz2 yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar.lz yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar.xz yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.tar.zst yuzu-b335cce22ee803a1a467425a0cc689e2afbaf878.zip |
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 0427ebc95..e51a4480f 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -262,7 +262,7 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { } void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { - QWidget* new_info_widget; + QWidget* new_info_widget = nullptr; const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt(); if (COMMAND_IN_RANGE(command_id, texture0) || @@ -283,14 +283,15 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format); u8* src = Memory::GetPhysicalPointer(config.GetPhysicalAddress()); new_info_widget = new TextureInfoWidget(src, info); - } else { - new_info_widget = new QWidget; } - - widget()->layout()->removeWidget(command_info_widget); - delete command_info_widget; - widget()->layout()->addWidget(new_info_widget); - command_info_widget = new_info_widget; + if (command_info_widget) { + delete command_info_widget; + command_info_widget = nullptr; + } + if (new_info_widget) { + widget()->layout()->addWidget(new_info_widget); + command_info_widget = new_info_widget; + } } #undef COMMAND_IN_RANGE @@ -328,7 +329,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi connect(copy_all, SIGNAL(clicked()), this, SLOT(CopyAllToClipboard())); - command_info_widget = new QWidget; + command_info_widget = nullptr; QVBoxLayout* main_layout = new QVBoxLayout; main_layout->addWidget(list_widget); @@ -338,7 +339,6 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi sub_layout->addWidget(copy_all); main_layout->addLayout(sub_layout); } - main_layout->addWidget(command_info_widget); main_widget->setLayout(main_layout); setWidget(main_widget); |