⛏️ index : haiku.git

author Augustin Cavalier <waddlesplash@gmail.com> 2025-04-30 13:46:27.0 -04:00:00
committer Augustin Cavalier <waddlesplash@gmail.com> 2025-04-30 13:46:27.0 -04:00:00
commit
79aac200ed448fb95fea3de548461cb37cdcfa40 [patch]
tree
de19f94945f854bf93d078bcb7c6e11823ea86b2
parent
1df290c521857676f4f773fef071ee166ba442d9
download
79aac200ed448fb95fea3de548461cb37cdcfa40.tar.gz

Tracker: Don't create the TitleView and CountView for the desktop.

They aren't used, so this just leaked memory.

Diff

 src/kits/tracker/PoseView.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 2a52183..3eec3c1 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -328,14 +328,16 @@
void
BPoseView::InitCommon()
{
	// Create the TitleView and CountView
	fTitleView = new BTitleView(this);
	if (ViewMode() != kListMode)
		fTitleView->Hide();
	if (fHScrollBar != NULL)
		fHScrollBar->SetTitleView(fTitleView);
	if (!IsDesktopView()) {
		// Create the TitleView and CountView
		fTitleView = new BTitleView(this);
		if (ViewMode() != kListMode)
			fTitleView->Hide();
		if (fHScrollBar != NULL)
			fHScrollBar->SetTitleView(fTitleView);

	fCountView = new BCountView(this);
		fCountView = new BCountView(this);
	}

	BPoint origin;
	if (ViewMode() == kListMode)