mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
accept ./ as icon filename prefix
This commit is contained in:
parent
88d573917e
commit
f5bb5b420f
@ -736,11 +736,16 @@ bool osxGraphicsWindow::set_icon_filename(const Filename &icon_filename)
|
|||||||
|
|
||||||
Filename icon_pathname = icon_filename;
|
Filename icon_pathname = icon_filename;
|
||||||
if (!vfs->resolve_filename(icon_pathname, get_model_path())) {
|
if (!vfs->resolve_filename(icon_pathname, get_model_path())) {
|
||||||
// The filename doesn't exist.
|
// The filename doesn't exist along the search path.
|
||||||
|
if (icon_pathname.is_fully_qualified() && vfs->exists(icon_pathname)) {
|
||||||
|
// But it does exist locally, so accept it.
|
||||||
|
|
||||||
|
} else {
|
||||||
osxdisplay_cat.warning()
|
osxdisplay_cat.warning()
|
||||||
<< "Could not find icon filename " << icon_filename << "\n";
|
<< "Could not find icon filename " << icon_filename << "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PNMImage pnmimage;
|
PNMImage pnmimage;
|
||||||
|
@ -2280,11 +2280,16 @@ get_icon(const Filename &filename) {
|
|||||||
// virtual file system.
|
// virtual file system.
|
||||||
Filename resolved = filename;
|
Filename resolved = filename;
|
||||||
if (!resolved.resolve_filename(get_model_path())) {
|
if (!resolved.resolve_filename(get_model_path())) {
|
||||||
// The filename doesn't exist.
|
// The filename doesn't exist along the search path.
|
||||||
|
if (resolved.is_fully_qualified() && resolved.exists()) {
|
||||||
|
// But it does exist locally, so accept it.
|
||||||
|
|
||||||
|
} else {
|
||||||
windisplay_cat.warning()
|
windisplay_cat.warning()
|
||||||
<< "Could not find icon filename " << filename << "\n";
|
<< "Could not find icon filename " << filename << "\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fi = _icon_filenames.find(resolved);
|
fi = _icon_filenames.find(resolved);
|
||||||
if (fi != _icon_filenames.end()) {
|
if (fi != _icon_filenames.end()) {
|
||||||
_icon_filenames[filename] = (*fi).second;
|
_icon_filenames[filename] = (*fi).second;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user