Skip to content

Commit

Permalink
Version 0.1.4
Browse files Browse the repository at this point in the history
- Program should now stay at the same tab when refreshing
  • Loading branch information
tina-nova committed Apr 2, 2021
1 parent 2aca9ff commit 6c7b0cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TFV_LabelFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ QTabWidget *PopulateTabs(QTabWidget *tabList, vector<tab> tabs)
}
else
{
// (2/3) then check if the item has been flagged for another day
// (2/3) color all lables white by default and then check if the item has been flagged for another day
itemLabel->setStyleSheet("QLabel { background-color : #FFFFFF }");
//cout << "Checking if status is MOVED" << endl;
if (i.GetMTOD())
{
Expand All @@ -212,7 +213,7 @@ QTabWidget *PopulateTabs(QTabWidget *tabList, vector<tab> tabs)
moved.append(itemLabel);
}

// (3/3) finally, do the rest
// (3/3) finally, color the labels to match their status
else
{
//cout << "Status is not 'MOVED'" << endl;
Expand Down
3 changes: 3 additions & 0 deletions TFV_Viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ void Viewer::RunViewer(vector<tab> tabs, QWidget *newWidget)
gridLayout->setMargin(0);



// Step3c. Set the grid layout as a main layout
newWidget->setLayout(gridLayout);

Expand All @@ -46,6 +47,7 @@ void Viewer::RunViewer(vector<tab> tabs, QWidget *newWidget)
// Step4. If the window is already open, just put a new widget on top of the old one. Otherwise, open a new window
if (s->isVisible())
{
int currentTabIndex = s->currentWidget()->findChild<QTabWidget *>()->currentIndex();
s->setCurrentWidget(newWidget);
// loop just in case I somehow end up with multiple widgets
for (int i = s->count(); i > 0; i--)
Expand All @@ -58,6 +60,7 @@ void Viewer::RunViewer(vector<tab> tabs, QWidget *newWidget)
toDelete->deleteLater();
}
}
s->currentWidget()->findChild<QTabWidget *>()->setCurrentIndex(currentTabIndex);

}
else
Expand Down
Empty file modified alphanum.hpp
100755 → 100644
Empty file.
Empty file modified fdl-1.2.md
100755 → 100644
Empty file.

0 comments on commit 6c7b0cb

Please sign in to comment.