mirror of https://github.com/RPCS3/rpcs3.git
cg_disasm: fix frame by removing parent
This commit is contained in:
parent
fb816a0eb9
commit
713c1a7a86
|
@ -19,7 +19,7 @@
|
||||||
constexpr auto qstr = QString::fromStdString;
|
constexpr auto qstr = QString::fromStdString;
|
||||||
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||||
|
|
||||||
cg_disasm_window::cg_disasm_window(std::shared_ptr<gui_settings> xSettings, QWidget* parent): QWidget(parent), xgui_settings(xSettings)
|
cg_disasm_window::cg_disasm_window(std::shared_ptr<gui_settings> xSettings): xgui_settings(xSettings)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Cg Disasm"));
|
setWindowTitle(tr("Cg Disasm"));
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
@ -72,7 +72,6 @@ void cg_disasm_window::ShowContextMenu(const QPoint &pos)
|
||||||
QString filePath = QFileDialog::getOpenFileName(this, tr("Select Cg program object"), m_path_last, tr("Cg program objects (*.fpo;*.vpo);;"));
|
QString filePath = QFileDialog::getOpenFileName(this, tr("Select Cg program object"), m_path_last, tr("Cg program objects (*.fpo;*.vpo);;"));
|
||||||
if (filePath == NULL) return;
|
if (filePath == NULL) return;
|
||||||
m_path_last = filePath;
|
m_path_last = filePath;
|
||||||
|
|
||||||
ShowDisasm();
|
ShowDisasm();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -81,14 +80,13 @@ void cg_disasm_window::ShowContextMenu(const QPoint &pos)
|
||||||
|
|
||||||
void cg_disasm_window::ShowDisasm()
|
void cg_disasm_window::ShowDisasm()
|
||||||
{
|
{
|
||||||
xgui_settings->SetValue(GUI::fd_cg_disasm, m_path_last);
|
|
||||||
|
|
||||||
if (QFileInfo(m_path_last).isFile())
|
if (QFileInfo(m_path_last).isFile())
|
||||||
{
|
{
|
||||||
CgBinaryDisasm disasm(sstr(m_path_last));
|
CgBinaryDisasm disasm(sstr(m_path_last));
|
||||||
disasm.BuildShaderBody();
|
disasm.BuildShaderBody();
|
||||||
m_disasm_text->setText(qstr(disasm.GetArbShader()));
|
m_disasm_text->setText(qstr(disasm.GetArbShader()));
|
||||||
m_glsl_text->setText(qstr(disasm.GetGlslShader()));
|
m_glsl_text->setText(qstr(disasm.GetGlslShader()));
|
||||||
|
xgui_settings->SetValue(GUI::fd_cg_disasm, m_path_last);
|
||||||
}
|
}
|
||||||
else if (!m_path_last.isEmpty())
|
else if (!m_path_last.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ private:
|
||||||
std::shared_ptr<gui_settings> xgui_settings;
|
std::shared_ptr<gui_settings> xgui_settings;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit cg_disasm_window(std::shared_ptr<gui_settings> xSettings, QWidget *parent);
|
explicit cg_disasm_window(std::shared_ptr<gui_settings> xSettings);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dropEvent(QDropEvent* ev);
|
void dropEvent(QDropEvent* ev);
|
||||||
|
|
|
@ -1171,7 +1171,7 @@ void main_window::CreateConnects()
|
||||||
sdid->show();
|
sdid->show();
|
||||||
});
|
});
|
||||||
connect(ui->toolsCgDisasmAct, &QAction::triggered, [=](){
|
connect(ui->toolsCgDisasmAct, &QAction::triggered, [=](){
|
||||||
cg_disasm_window* cgdw = new cg_disasm_window(guiSettings, this);
|
cg_disasm_window* cgdw = new cg_disasm_window(guiSettings);
|
||||||
cgdw->show();
|
cgdw->show();
|
||||||
});
|
});
|
||||||
connect(ui->toolskernel_explorerAct, &QAction::triggered, [=](){
|
connect(ui->toolskernel_explorerAct, &QAction::triggered, [=](){
|
||||||
|
|
Loading…
Reference in New Issue