Skip to content

Commit fc6b8f6

Browse files
committed
gui: fix through filter in the timing widget
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
1 parent 771bf8e commit fc6b8f6

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/gui/src/dropdownCheckboxes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class DropdownCheckboxes : public QComboBox
4848
QStandardItem* getAllItem() { return all_item_; };
4949

5050
QStandardItemModel* model() { return model_; };
51+
bool isAllSelected() { return all_item_->checkState() == Qt::Checked; };
5152
std::vector<QString> selectedItems();
5253

5354
public slots:

src/gui/src/staGui.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,12 @@ std::vector<std::set<const sta::Pin*>> TimingControlsDialog::getThruPins() const
13621362
return pins;
13631363
}
13641364

1365-
const sta::ClockSet* TimingControlsDialog::getClocks()
1365+
const sta::ClockSet* TimingControlsDialog::getClocks(bool return_null_if_all)
13661366
{
1367+
if (return_null_if_all && clock_box_->isAllSelected()) {
1368+
return nullptr;
1369+
}
1370+
13671371
selected_clocks_.clear();
13681372
for (const auto& clk_name : clock_box_->selectedItems()) {
13691373
selected_clocks_.insert(qstring_to_clk_[clk_name]);

src/gui/src/staGui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class TimingControlsDialog : public QDialog
410410
std::set<const sta::Pin*> getFromPins() const { return from_->getPins(); }
411411
std::vector<std::set<const sta::Pin*>> getThruPins() const;
412412
std::set<const sta::Pin*> getToPins() const { return to_->getPins(); }
413-
const sta::ClockSet* getClocks();
413+
const sta::ClockSet* getClocks(bool return_null_if_all = true);
414414

415415
const sta::Pin* convertTerm(Gui::Term term) const;
416416

src/gui/src/staGuiInterface.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ TimingPathList STAGuiInterface::getTimingPaths(
10951095
pins, nullptr, nullptr, sta::RiseFallBoth::riseFall()));
10961096
}
10971097
}
1098+
10981099
sta::ExceptionTo* e_to = nullptr;
10991100
if (!to.empty()) {
11001101
sta::PinSet* pins = new sta::PinSet(getNetwork());
@@ -1119,6 +1120,7 @@ TimingPathList STAGuiInterface::getTimingPaths(
11191120
}
11201121

11211122
sta::Search* search = sta_->search();
1123+
search->clear();
11221124
sta::PathEndSeq path_ends
11231125
= search->findPathEnds( // from, thrus, to, unconstrained
11241126
e_from,

0 commit comments

Comments
 (0)