Remove duplicate code.
This commit is contained in:
parent
38fc939860
commit
d629ef4cba
1 changed files with 4 additions and 8 deletions
|
|
@ -95,14 +95,10 @@ CrudTab *DatabaseWindow::GetActiveCrud()
|
|||
void DatabaseWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
for (int idx = 0; idx < m_tabWidget->count(); ++idx) {
|
||||
auto widget = m_tabWidget->widget(idx);
|
||||
auto mp = dynamic_cast<ManagedPage*>(widget);
|
||||
if (mp) {
|
||||
if (!mp->CanClose(true)) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!canCloseTab(idx)) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue