diff options
| author | Mason Reed <mason@vector35.com> | 2026-03-03 09:15:02 -0800 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-03-24 18:46:48 -0700 |
| commit | f852785e4ae0eb9bd560566221e9f6d70c895b32 (patch) | |
| tree | ce7d18cdd284492fc91ae5c8625581cd18af3df6 | |
| parent | 2c358e705bbde855b12780be86ef19501a62dfed (diff) | |
[WARP] Update the selected sidebar function when refocusing
Should fix issue where opening the sidebar for the first time will not show anything in the selected function until the user clicks in the view frame
| -rw-r--r-- | plugins/warp/ui/plugin.cpp | 7 | ||||
| -rw-r--r-- | plugins/warp/ui/plugin.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/warp/ui/plugin.cpp b/plugins/warp/ui/plugin.cpp index 66c80ba3..9421cc02 100644 --- a/plugins/warp/ui/plugin.cpp +++ b/plugins/warp/ui/plugin.cpp @@ -227,7 +227,6 @@ void WarpSidebarWidget::notifyViewChanged(ViewFrame* view) if (view == m_currentFrame) return; m_currentFrame = view; - // TODO: We need to set some stuff here prolly. } void WarpSidebarWidget::notifyViewLocationChanged(View* view, const ViewLocation& location) @@ -241,6 +240,12 @@ void WarpSidebarWidget::notifyViewLocationChanged(View* view, const ViewLocation m_currentFunctionWidget->SetCurrentFunction(function); } +void WarpSidebarWidget::focus() +{ + m_currentFunctionWidget->SetCurrentFunction(m_currentFrame->getViewLocation().getFunction()); + SidebarWidget::focus(); +} + WarpSidebarWidgetType::WarpSidebarWidgetType() : SidebarWidgetType(QImage(":/icons/images/warp.png"), "WARP") {} diff --git a/plugins/warp/ui/plugin.h b/plugins/warp/ui/plugin.h index e70b7afa..0a4c630c 100644 --- a/plugins/warp/ui/plugin.h +++ b/plugins/warp/ui/plugin.h @@ -39,6 +39,8 @@ public: void notifyViewChanged(ViewFrame*) override; void notifyViewLocationChanged(View*, const ViewLocation&) override; + + void focus() override; }; class WarpSidebarWidgetType : public SidebarWidgetType |
