Skip to content

Commit

Permalink
Remove createNameForTab() method in VolbxMain.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Jan 22, 2025
1 parent 3a4a3ce commit 9fb4f62
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 1 addition & 6 deletions src/GUI/VolbxMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,12 @@ void VolbxMain::actionImportDataTriggered()
config_.setImportFilePath(importData.getImportFilePath());
}

QString VolbxMain::createNameForTab(const std::unique_ptr<Dataset>& dataset)
void VolbxMain::addMainTabForDataset(std::unique_ptr<Dataset> dataset)
{
QString nameForTabBar{dataset->getName()};
if (auto [ok, column]{dataset->getTaggedColumn(ColumnTag::VALUE)}; ok)
nameForTabBar.append(" (" + dataset->getHeaderName(column) + ")");
return nameForTabBar;
}

void VolbxMain::addMainTabForDataset(std::unique_ptr<Dataset> dataset)
{
const QString nameForTabBar{createNameForTab(dataset)};
const QString datasetName{dataset->getName()};

auto* mainTab{new Tab(std::move(dataset), &tabWidget_)};
Expand Down
2 changes: 0 additions & 2 deletions src/GUI/VolbxMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ class VolbxMain : public QMainWindow

void importDataset(std::unique_ptr<Dataset> dataset);

static QString createNameForTab(const std::unique_ptr<Dataset>& dataset);

bool canUpdate(QNetworkReply* reply);

static void updateApplication();
Expand Down

0 comments on commit 9fb4f62

Please sign in to comment.