change slot name
This commit is contained in:
parent
4a261cac1a
commit
fa5b1d9978
@ -2102,7 +2102,7 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_selectedInstance) {
|
if (m_selectedInstance) {
|
||||||
disconnect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::on_InstanceState_changed);
|
disconnect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
|
||||||
}
|
}
|
||||||
QString id = current.data(InstanceList::InstanceIDRole).toString();
|
QString id = current.data(InstanceList::InstanceIDRole).toString();
|
||||||
m_selectedInstance = APPLICATION->instances()->getInstanceById(id);
|
m_selectedInstance = APPLICATION->instances()->getInstanceById(id);
|
||||||
@ -2131,7 +2131,7 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &
|
|||||||
|
|
||||||
APPLICATION->settings()->set("SelectedInstance", m_selectedInstance->id());
|
APPLICATION->settings()->set("SelectedInstance", m_selectedInstance->id());
|
||||||
|
|
||||||
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::on_InstanceState_changed);
|
connect(m_selectedInstance.get(), &BaseInstance::runningStatusChanged, this, &MainWindow::refreshCurrentInstance);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2222,7 +2222,7 @@ void MainWindow::updateStatusCenter()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_InstanceState_changed(bool running)
|
void MainWindow::refreshCurrentInstance(bool running)
|
||||||
{
|
{
|
||||||
auto current = view->selectionModel()->currentIndex();
|
auto current = view->selectionModel()->currentIndex();
|
||||||
instanceChanged(current, current);
|
instanceChanged(current, current);
|
||||||
|
@ -192,7 +192,7 @@ private slots:
|
|||||||
void keyReleaseEvent(QKeyEvent *event) override;
|
void keyReleaseEvent(QKeyEvent *event) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void on_InstanceState_changed(bool running);
|
void refreshCurrentInstance(bool running);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
Loading…
Reference in New Issue
Block a user