tycho: fix activeProject returning the wrong object
parent
82d0d378b0
commit
cb9d844404
|
@ -81,6 +81,8 @@ void Menu::updateActions()
|
|||
bool active = view != nullptr;
|
||||
|
||||
ui->actionMapProps->setEnabled(active);
|
||||
|
||||
dbgPrintFunc();
|
||||
}
|
||||
|
||||
void Menu::closeEvent(QCloseEvent *event)
|
||||
|
@ -97,8 +99,7 @@ void Menu::closeEvent(QCloseEvent *event)
|
|||
|
||||
ProjectView *Menu::activeProject() const
|
||||
{
|
||||
auto win = activeSubWindow();
|
||||
return win ? qobject_cast<ProjectView *>(win->widget()) : nullptr;
|
||||
return qobject_cast<ProjectView *>(activeSubWindow());
|
||||
}
|
||||
|
||||
QMdiSubWindow *Menu::activeSubWindow() const
|
||||
|
|
|
@ -13,7 +13,7 @@ ProjectModel::~ProjectModel()
|
|||
|
||||
bool ProjectModel::isDirty() const
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ProjectModel::open(const QString &fname)
|
||||
|
|
Loading…
Reference in New Issue