Commit e57c13fc authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Return default value if view is not instanciated.

parent 5b4ee749
# ChangeLog
## version 1.5.2 - 2018-11-05
- Return default value if view is not instanciated.
## version 1.5.1 - 2018-07-25
- export `DTK_PYTHON_INSTALL_PATH` variable
## version 1.5.0 - 2018-07-25
......
......@@ -24,7 +24,7 @@ project(dtk)
set(dtk_VERSION_MAJOR 1)
set(dtk_VERSION_MINOR 5)
set(dtk_VERSION_PATCH 1)
set(dtk_VERSION_PATCH 2)
set(dtk_VERSION
${dtk_VERSION_MAJOR}.${dtk_VERSION_MINOR}.${dtk_VERSION_PATCH})
......
......@@ -43,7 +43,7 @@ void dtkViewController::insert(dtkViewWidget *view)
dtkViewWidget *dtkViewController::view(const QString& name)
{
return d->views.value(name);
return d->views.value(name, nullptr);
}
QStringList dtkViewController::viewNames(void)
......
......@@ -641,6 +641,8 @@ void dtkViewLayoutItem::dropEvent(QDropEvent *event)
return;
dtkViewWidget *view = dtkViewController::instance()->view(event->mimeData()->text());
if (!view)
return;
view->setObjectName(event->mimeData()->text());
d->proxy->setView(view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment