MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / updateNavigationButtons

Method updateNavigationButtons

src/app/ui/file_selector.cpp:655–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655void FileSelector::updateNavigationButtons()
656{
657 // Update the state of the go back button: if the navigation-history
658 // has two elements and the navigation-position isn't the first one.
659 goBackButton()->setEnabled(navigation_history->size() > 1 &&
660 (navigation_position.isNull() ||
661 navigation_position.getIterator() != navigation_history->begin()));
662
663 // Update the state of the go forward button: if the
664 // navigation-history has two elements and the navigation-position
665 // isn't the last one.
666 goForwardButton()->setEnabled(navigation_history->size() > 1 &&
667 (navigation_position.isNull() ||
668 navigation_position.getIterator() != navigation_history->end()-1));
669
670 // Update the state of the go up button: if the current-folder isn't
671 // the root-item.
672 IFileItem* currentFolder = m_fileList->getCurrentFolder();
673 goUpButton()->setEnabled(currentFolder != FileSystemModule::instance()->getRootFileItem());
674}
675
676void FileSelector::addInNavigationHistory(IFileItem* folder)
677{

Callers

nothing calls this directly

Calls 9

instanceFunction · 0.85
setEnabledMethod · 0.80
isNullMethod · 0.80
getIteratorMethod · 0.80
getCurrentFolderMethod · 0.80
getRootFileItemMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected