Skip to content

Commit

Permalink
Trends Sidebar - Don't process itemChanged event from date range tree
Browse files Browse the repository at this point in the history
Items are not editable, so it is not used in the normal flow,
and it worsen a bug which clears the date range name in the item
when dropping on compare pane commiting the change to seasons.xml
  • Loading branch information
amtriathlon committed Aug 31, 2022
1 parent 80b671f commit b02b5f1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
18 changes: 0 additions & 18 deletions src/Gui/LTMSidebar.cpp
Expand Up @@ -226,7 +226,6 @@ LTMSidebar::LTMSidebar(Context *context) : QWidget(context->mainWindow), context
// our date ranges
connect(dateRangeTree,SIGNAL(itemSelectionChanged()), this, SLOT(dateRangeTreeWidgetSelectionChanged()));
connect(dateRangeTree,SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(dateRangePopup(const QPoint &)));
connect(dateRangeTree,SIGNAL(itemChanged(QTreeWidgetItem *,int)), this, SLOT(dateRangeChanged(QTreeWidgetItem*, int)));
connect(dateRangeTree,SIGNAL(itemMoved(QTreeWidgetItem *,int, int)), this, SLOT(dateRangeMoved(QTreeWidgetItem*, int, int)));

// filters
Expand Down Expand Up @@ -1113,23 +1112,6 @@ LTMSidebar::deleteFilter()
active = false;
}

void
LTMSidebar::dateRangeChanged(QTreeWidgetItem*item, int)
{
if (active == true) return;

int index = allDateRanges->indexOfChild(item);
seasons->seasons[index].setName(item->text(0));

// save changes away
active = true;
seasons->writeSeasons();
active = false;

// signal date selected changed
//dateRangeSelected(&seasons->seasons[index]);
}

void
LTMSidebar::dateRangeMoved(QTreeWidgetItem*item, int oldposition, int newposition)
{
Expand Down
1 change: 0 additions & 1 deletion src/Gui/LTMSidebar.h
Expand Up @@ -59,7 +59,6 @@ class LTMSidebar : public QWidget
void dateRangeTreeWidgetSelectionChanged();
void dateRangePopup(QPoint);
void dateRangePopup();
void dateRangeChanged(QTreeWidgetItem *, int);
void dateRangeMoved(QTreeWidgetItem *, int, int);
void addRange();
void editRange();
Expand Down

0 comments on commit b02b5f1

Please sign in to comment.