mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 12:57:52 +00:00
Shader Debugger: Fix freeze when double-clicking shader disassembly
This commit is contained in:
parent
2d195ba64e
commit
c1beb2ce20
3 changed files with 4 additions and 14 deletions
|
@ -359,7 +359,7 @@ void GPUCommandListWidget::CopyAllToClipboard() {
|
||||||
QClipboard* clipboard = QApplication::clipboard();
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
QAbstractItemModel* model = static_cast<QAbstractListModel*>(list_widget->model());
|
QAbstractItemModel* model = static_cast<QAbstractItemModel*>(list_widget->model());
|
||||||
|
|
||||||
for (int row = 0; row < model->rowCount({}); ++row) {
|
for (int row = 0; row < model->rowCount({}); ++row) {
|
||||||
for (int col = 0; col < model->columnCount({}); ++col) {
|
for (int col = 0; col < model->columnCount({}); ++col) {
|
||||||
|
|
|
@ -27,18 +27,10 @@ using nihstro::Instruction;
|
||||||
using nihstro::SourceRegister;
|
using nihstro::SourceRegister;
|
||||||
using nihstro::SwizzlePattern;
|
using nihstro::SwizzlePattern;
|
||||||
|
|
||||||
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent): QAbstractItemModel(parent), par(parent) {
|
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent): QAbstractTableModel(parent), par(parent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex GraphicsVertexShaderModel::index(int row, int column, const QModelIndex& parent) const {
|
|
||||||
return createIndex(row, column);
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndex GraphicsVertexShaderModel::parent(const QModelIndex& child) const {
|
|
||||||
return QModelIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
|
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractTableModel>
|
||||||
|
|
||||||
#include "graphics_breakpoint_observer.h"
|
#include "graphics_breakpoint_observer.h"
|
||||||
|
|
||||||
|
@ -17,14 +17,12 @@ class QSpinBox;
|
||||||
|
|
||||||
class GraphicsVertexShaderWidget;
|
class GraphicsVertexShaderWidget;
|
||||||
|
|
||||||
class GraphicsVertexShaderModel : public QAbstractItemModel {
|
class GraphicsVertexShaderModel : public QAbstractTableModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent);
|
GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent);
|
||||||
|
|
||||||
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
|
||||||
QModelIndex parent(const QModelIndex& child) const override;
|
|
||||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
Loading…
Reference in a new issue