fix: make resource buttons work when instance is running
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -14,8 +14,6 @@ ExternalResourcesPage::ExternalResourcesPage(BaseInstance* instance, std::shared
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ExternalResourcesPage::runningStateChanged(m_instance && m_instance->isRunning());
|
||||
|
||||
ui->actionsToolbar->insertSpacer(ui->actionViewConfigs);
|
||||
|
||||
m_filterModel = model->createFilterProxyModel(this);
|
||||
@ -45,7 +43,6 @@ ExternalResourcesPage::ExternalResourcesPage(BaseInstance* instance, std::shared
|
||||
auto selection_model = ui->treeView->selectionModel();
|
||||
connect(selection_model, &QItemSelectionModel::currentChanged, this, &ExternalResourcesPage::current);
|
||||
connect(ui->filterEdit, &QLineEdit::textChanged, this, &ExternalResourcesPage::filterTextChanged);
|
||||
connect(m_instance, &BaseInstance::runningStatusChanged, this, &ExternalResourcesPage::runningStateChanged);
|
||||
}
|
||||
|
||||
ExternalResourcesPage::~ExternalResourcesPage()
|
||||
@ -97,14 +94,6 @@ void ExternalResourcesPage::filterTextChanged(const QString& newContents)
|
||||
m_filterModel->setFilterRegularExpression(m_viewFilter);
|
||||
}
|
||||
|
||||
void ExternalResourcesPage::runningStateChanged(bool running)
|
||||
{
|
||||
if (m_controlsEnabled == !running)
|
||||
return;
|
||||
|
||||
m_controlsEnabled = !running;
|
||||
}
|
||||
|
||||
bool ExternalResourcesPage::shouldDisplay() const
|
||||
{
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user