MCPcopy Create free account
hub / github.com/MyGUI/mygui / update

Method update

UnitTests/UnitTest_GraphView/OpenSaveFileDialog.cpp:150–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 void OpenSaveFileDialog::update()
151 {
152 if (mCurrentFolder.empty())
153 mCurrentFolder = "/";
154 mCurrentFolderField->setCaption(mCurrentFolder);
155
156 mListFiles->removeAllItems();
157
158 // add all folders first
159 common::VectorFileInfo infos;
160 getSystemFileList(infos, mCurrentFolder, L"*.*");
161
162 for (auto& info : infos)
163 {
164 if (info.folder)
165 mListFiles->addItem(L"[" + info.name + L"]", info);
166 }
167
168 if (!mFolderMode)
169 {
170 // add files by given mask
171 infos.clear();
172 getSystemFileList(infos, mCurrentFolder, mFileMask);
173
174 for (auto& info : infos)
175 {
176 if (!info.folder)
177 mListFiles->addItem(info.name, info);
178 }
179 }
180 }
181
182 void OpenSaveFileDialog::setFileName(const MyGUI::UString& _value)
183 {

Callers

nothing calls this directly

Calls 6

getSystemFileListFunction · 0.85
emptyMethod · 0.45
setCaptionMethod · 0.45
removeAllItemsMethod · 0.45
addItemMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected