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

Method update

Tools/EditorFramework/OpenSaveFileDialog.cpp:140–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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