diff --git a/src/widgets/chatwidget.cpp b/src/widgets/chatwidget.cpp index 60c55f7ae..138c54cf6 100644 --- a/src/widgets/chatwidget.cpp +++ b/src/widgets/chatwidget.cpp @@ -224,7 +224,7 @@ boost::property_tree::ptree ChatWidget::save() void ChatWidget::doAddSplit() { NotebookPage *page = static_cast(this->parentWidget()); - page->addChat(); + page->addChat(true); } void ChatWidget::doCloseSplit() diff --git a/src/widgets/notebookpage.cpp b/src/widgets/notebookpage.cpp index 523276c78..f34ee1ddf 100644 --- a/src/widgets/notebookpage.cpp +++ b/src/widgets/notebookpage.cpp @@ -103,6 +103,7 @@ void NotebookPage::addToLayout(ChatWidget *widget, std::pair position = std::pair(-1, -1)) { _chatWidgets.push_back(widget); + widget->giveFocus(); // add vbox at the end if (position.first < 0 || position.first >= _hbox.count()) { diff --git a/src/widgets/scrollbar.cpp b/src/widgets/scrollbar.cpp index ea50f5183..73f4de5d1 100644 --- a/src/widgets/scrollbar.cpp +++ b/src/widgets/scrollbar.cpp @@ -13,11 +13,10 @@ namespace widgets { ScrollBar::ScrollBar(ChatWidgetView *parent) : BaseWidget(parent) - , _currentValueAnimation(this, "currentValue") + , _currentValueAnimation(this, "_currentValue") , _highlights(nullptr) { resize(16, 100); - _currentValueAnimation.setDuration(250); _currentValueAnimation.setEasingCurve(QEasingCurve(QEasingCurve::OutCubic));