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)
|
void DatabaseWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
for (int idx = 0; idx < m_tabWidget->count(); ++idx) {
|
for (int idx = 0; idx < m_tabWidget->count(); ++idx) {
|
||||||
auto widget = m_tabWidget->widget(idx);
|
if (!canCloseTab(idx)) {
|
||||||
auto mp = dynamic_cast<ManagedPage*>(widget);
|
event->ignore();
|
||||||
if (mp) {
|
return;
|
||||||
if (!mp->CanClose(true)) {
|
}
|
||||||
event->ignore();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue