From 0d27f16c4ab0e2f84ed6dd1f1cee7dec66e372e6 Mon Sep 17 00:00:00 2001 From: hemirt Date: Thu, 29 Jun 2017 14:13:00 +0200 Subject: [PATCH] fix wrong variable name, openChannelNameDialog on ctrl+t, give focus to (#47) new split --- src/widgets/chatwidget.cpp | 2 +- src/widgets/notebookpage.cpp | 1 + src/widgets/scrollbar.cpp | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) 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));