Commit da0c8e21 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Update git status on toolview shown

parent 70279f78
......@@ -177,6 +177,9 @@ KateProjectPluginView::KateProjectPluginView(KateProjectPlugin *plugin, KTextEdi
connect(m_mainWindow, &KTextEditor::MainWindow::unhandledShortcutOverride, this, &KateProjectPluginView::handleEsc);
// update git status on toolview visibility change
connect(m_gitToolView.get(), SIGNAL(toolVisibleChanged(bool)), this, SLOT(slotUpdateStatus(bool)));
/**
* add us to gui
*/
......@@ -624,4 +627,15 @@ void KateProjectPluginView::handleEsc(QEvent *e)
}
}
void KateProjectPluginView::slotUpdateStatus(bool visible)
{
if (!visible) {
return;
}
if (auto widget = m_stackedgitViews->currentWidget()) {
static_cast<GitWidget *>(widget)->getStatus();
}
}
#include "kateprojectpluginview.moc"
......@@ -209,6 +209,11 @@ private Q_SLOTS:
*/
void handleEsc(QEvent *e);
/**
* Update git status on toolview shown
*/
void slotUpdateStatus(bool visible);
private:
/**
* find current selected or under cursor word
......
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