Disable interface for operations that takes a long time
This commit is contained in:
parent
434f1707c7
commit
102daf9a96
|
@ -104,8 +104,15 @@ void ExportPanel::OnButtonSearch()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
|
_wxUI->setEnabled(false);
|
||||||
|
_wxUI->repaint();
|
||||||
|
|
||||||
_grid->LoadOperations(_operations, 0, 0);
|
_grid->LoadOperations(_operations, 0, 0);
|
||||||
|
|
||||||
|
_wxUI->setEnabled(true);
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::ArrowCursor));
|
||||||
|
|
||||||
layout();
|
layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -378,6 +378,10 @@ void ImportPanel::OnIntegrate()
|
||||||
|
|
||||||
_buttonIntegrate->setEnabled(false);
|
_buttonIntegrate->setEnabled(false);
|
||||||
|
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
|
_wxUI->setEnabled(false);
|
||||||
|
_wxUI->repaint();
|
||||||
|
|
||||||
for(i=0; i<(int)_operations->size(); i++)
|
for(i=0; i<(int)_operations->size(); i++)
|
||||||
{
|
{
|
||||||
oldid = (*_operations)[i].id;
|
oldid = (*_operations)[i].id;
|
||||||
|
@ -423,6 +427,9 @@ void ImportPanel::OnIntegrate()
|
||||||
_operations->clear();
|
_operations->clear();
|
||||||
_operationsGrid->ClearGrid();
|
_operationsGrid->ClearGrid();
|
||||||
|
|
||||||
|
_wxUI->setEnabled(true);
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::ArrowCursor));
|
||||||
|
|
||||||
QMessageBox::information(0, "KissCount", _("Operations successfully imported"));
|
QMessageBox::information(0, "KissCount", _("Operations successfully imported"));
|
||||||
|
|
||||||
_wxUI->NeedReload();
|
_wxUI->NeedReload();
|
||||||
|
|
|
@ -90,7 +90,7 @@ QString SearchPanel::GetToolTip()
|
||||||
void SearchPanel::OnEnter(void* caller)
|
void SearchPanel::OnEnter(void* caller)
|
||||||
{
|
{
|
||||||
SearchPanel* _this = (SearchPanel*) caller;
|
SearchPanel* _this = (SearchPanel*) caller;
|
||||||
|
|
||||||
_this->OnButtonSearch();
|
_this->OnButtonSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,8 +110,15 @@ void SearchPanel::OnButtonSearch()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
|
_wxUI->setEnabled(false);
|
||||||
|
_wxUI->repaint();
|
||||||
|
|
||||||
_grid->LoadOperations(_operations, 0, 0);
|
_grid->LoadOperations(_operations, 0, 0);
|
||||||
|
|
||||||
|
_wxUI->setEnabled(true);
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::ArrowCursor));
|
||||||
|
|
||||||
_wxUI->layout();
|
_wxUI->layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1536,9 +1536,9 @@ void GridAccount::MassUpdate(std::vector<int>& rows, bool do_childs, updateOpera
|
||||||
std::vector<Operation>::iterator it;
|
std::vector<Operation>::iterator it;
|
||||||
Operation op, op2;
|
Operation op, op2;
|
||||||
|
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
_parent->setEnabled(false);
|
_parent->setEnabled(false);
|
||||||
|
_parent->repaint();
|
||||||
_parent->setCursor(Qt::BusyCursor);
|
|
||||||
|
|
||||||
if (rows.size())
|
if (rows.size())
|
||||||
{
|
{
|
||||||
|
@ -1586,6 +1586,5 @@ void GridAccount::MassUpdate(std::vector<int>& rows, bool do_childs, updateOpera
|
||||||
layout();
|
layout();
|
||||||
|
|
||||||
_parent->setEnabled(true);
|
_parent->setEnabled(true);
|
||||||
|
_kiss->setOverrideCursor(QCursor(Qt::ArrowCursor));
|
||||||
_parent->setCursor(Qt::ArrowCursor);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user